<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Ascender: The Blog]]></provider_name><provider_url><![CDATA[https://ascendergame.wordpress.com]]></provider_url><author_name><![CDATA[Ascender The Game]]></author_name><author_url><![CDATA[https://ascendergame.wordpress.com/author/ascenderthegame/]]></author_url><title><![CDATA[DEVLOG#30 &#8211; Irritating Implementation of Platforming Predicament, Part IV:&nbsp;Shader]]></title><type><![CDATA[link]]></type><html><![CDATA[<p style="text-align:justify;">Oh hello there, guys! Here already? Come on in! There are pictures to feast on and stories to savor, so pick a comfortable place to sit and eat well.</p>
<p style="text-align:justify;">Haven’t I introduced myself yet? Well, if you follow this blog from the beginning, you surely must know that I am Chalcedony, one of the programmers of Ascender. Well you know what – now I’m not an intern anymore in devlogging – I am a full-fledged one!</p>
<p style="text-align:justify;">Here we go, the appetizer: sneak peeks! The never-ever-seen-before scenes are ready for your eyes only! [*Plays awesome sound effect*]</p>
<p style="text-align:justify;">Firstly, we have the tendrils. Sky can jump on and off it. Note how they react accordingly to sky&#8217;s movement.</p>
<div data-shortcode="caption" id="attachment_962" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-962" data-attachment-id="962" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/sulur/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/sulur.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="sulur" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/sulur.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/sulur.gif?w=320" class="alignnone size-full wp-image-962 aligncenter" src="https://ascendergame.files.wordpress.com/2016/03/sulur.gif?w=320&#038;h=180" alt="sulur" width="320" height="180" /><p id="caption-attachment-962" class="wp-caption-text">Do the villagers climb on them too?</p></div>
<p style="text-align:justify;">This kind of trampoline is also fun for some boing-boing. Hold the jump button for more air time.</p>
<div data-shortcode="caption" id="attachment_963" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-963" data-attachment-id="963" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/trampoline/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/trampoline.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="trampoline" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/trampoline.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/trampoline.gif?w=320" class="alignnone size-full wp-image-963" src="https://ascendergame.files.wordpress.com/2016/03/trampoline.gif?w=320&#038;h=180" alt="trampoline" width="320" height="180" /><p id="caption-attachment-963" class="wp-caption-text">Trampoline image just for placeholder.</p></div>
<p style="text-align:justify;">How defying gravity sounds? You can climb wall and even fall into the horizon.</p>
<div data-shortcode="caption" id="attachment_961" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-961" data-attachment-id="961" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/skywalk/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/skywalk.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="skyWalk" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/skywalk.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/skywalk.gif?w=320" class="alignnone size-full wp-image-961 aligncenter" src="https://ascendergame.files.wordpress.com/2016/03/skywalk.gif?w=320&#038;h=180" alt="skyWalk" width="320" height="180" /><p id="caption-attachment-961" class="wp-caption-text">The house is still in repair, no worries.</p></div>
<p style="text-align:justify;">For today’s special, we serve shaders. What is a shader, you ask? <a href="https://en.wikipedia.org/wiki/Shader">Wikipedia</a> says “a program that tells a computer how to draw something in a specific and unique way”. Shader is used for special (and not-so-special) effects, like these.</p>
<p style="text-align:justify;">Remember this big robot? His laser effect was my first shader creation (not counting failures, of course)!</p>
<div data-shortcode="caption" id="attachment_958" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-958" data-attachment-id="958" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/bro/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/bro.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="bro" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/bro.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/bro.gif?w=320" class="alignnone size-full wp-image-958" src="https://ascendergame.files.wordpress.com/2016/03/bro.gif?w=320&#038;h=180" alt="bro" width="320" height="180" /><p id="caption-attachment-958" class="wp-caption-text">The rune stays intact, so why sky does not?</p></div>
<p style="text-align:justify;">The layer where sky is standing is affected by the light from the lamp, whereas the background and the foreground are not. Just shader.</p>
<div data-shortcode="caption" id="attachment_959" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-959" data-attachment-id="959" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/light-2/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/light.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="light" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/light.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/light.gif?w=320" class="alignnone size-full wp-image-959" src="https://ascendergame.files.wordpress.com/2016/03/light.gif?w=320&#038;h=180" alt="light" width="320" height="180" /><p id="caption-attachment-959" class="wp-caption-text">Villagers have nothing to do, so they spend the whole day standing there.</p></div>
<p style="text-align:justify;">Even simple menus need shader to clip the items so they are not rendered off-window.</p>
<div data-shortcode="caption" id="attachment_960" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-960" data-attachment-id="960" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/menu/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/menu.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="menu" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/menu.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/menu.gif?w=320" class="alignnone size-full wp-image-960" src="https://ascendergame.files.wordpress.com/2016/03/menu.gif?w=320&#038;h=180" alt="menu" width="320" height="180" /><p id="caption-attachment-960" class="wp-caption-text">Why so many tasks for so little robot?</p></div>
<p style="text-align:justify;">Look closely, the water distorts the scenery behind it. How to do it? Shader.</p>
<div data-shortcode="caption" id="attachment_964" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-964" data-attachment-id="964" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/water/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/water.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="water" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/water.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/water.gif?w=320" class="alignnone size-full wp-image-964" src="https://ascendergame.files.wordpress.com/2016/03/water.gif?w=320&#038;h=180" alt="water" width="320" height="180" /><p id="caption-attachment-964" class="wp-caption-text">It distorts my sanity too.</p></div>
<p style="text-align:justify;">Contrast to C# in terms of language, one should use Cg/HLSL language when creating shader in Unity. The scripts below both are for B.RO, the left one is written in C# for controlling the movement, and the right one is in Cg for you know, shading.</p>
<div data-shortcode="caption" id="attachment_955" style="width: 610px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-955" data-attachment-id="955" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/scriptcompare/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png" data-orig-size="600,340" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="scriptCompare" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png?w=600" class="alignnone size-full wp-image-955" src="https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png?w=600&#038;h=340" alt="scriptCompare" width="600" height="340" srcset="https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png 600w, https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png?w=150&amp;h=85 150w, https://ascendergame.files.wordpress.com/2016/03/scriptcompare.png?w=300&amp;h=170 300w" sizes="(max-width: 600px) 100vw, 600px" /><p id="caption-attachment-955" class="wp-caption-text">These are among the first scripts for this game! Bad, bad scripts.</p></div>
<p style="text-align:justify;"> Those two look alike, but in truth are quite huge in difference! Debugging is especially a hell in shading. You will often end up with this kind of result&#8230;</p>
<div data-shortcode="caption" id="attachment_1025" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-1025" data-attachment-id="1025" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/badwater1/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/badwater11.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="badWater1" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/badwater11.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/badwater11.gif?w=320" class="alignnone size-full wp-image-1025" src="https://ascendergame.files.wordpress.com/2016/03/badwater11.gif?w=320&#038;h=180" alt="badWater1" width="320" height="180" /><p id="caption-attachment-1025" class="wp-caption-text">Error in shader equals magenta for you. My favorite color!</p></div>
<p style="text-align:justify;">Of course without you knowing what’s wrong. For some cases, Unity will be a good guy and tell you (approximately) which line caused the shader into haywire. Granted, I am by no means a master in shading, but still, when you went to fix the line, then it goes boom&#8230;</p>
<div data-shortcode="caption" id="attachment_957" style="width: 330px" class="wp-caption aligncenter"><img loading="lazy" aria-describedby="caption-attachment-957" data-attachment-id="957" data-permalink="https://ascendergame.wordpress.com/2016/03/18/devlog30-irritating-implementation-of-platforming-predicament-part-iv-shader/badwater2/" data-orig-file="https://ascendergame.files.wordpress.com/2016/03/badwater2.gif" data-orig-size="320,180" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="badWater2" data-image-description="" data-image-caption="" data-medium-file="https://ascendergame.files.wordpress.com/2016/03/badwater2.gif?w=300" data-large-file="https://ascendergame.files.wordpress.com/2016/03/badwater2.gif?w=320" class="alignnone size-full wp-image-957" src="https://ascendergame.files.wordpress.com/2016/03/badwater2.gif?w=320&#038;h=180" alt="badWater2" width="320" height="180" /><p id="caption-attachment-957" class="wp-caption-text">Very menacing water.</p></div>
<p style="text-align:justify;">Gah! Dealing with these stuffs always drives me to my boiling point!</p>
<p style="text-align:justify;">Anyway, that’s all for today’s meal! Did you enjoyed it? What now, you need dessert too? If you are still craving for more, be sure to play our <a href="http://www.indiedb.com/games/ascender/downloads">public preview</a> now, and let us know what’s on your mind!</p>
<p style="text-align:justify;">Wow, it’s been ages since my last post, but now we must apart once more. Fret not, we will prepare more special dishes for you to relish, so stay tuned, and eat well. Bye!</p>
<p>&nbsp;</p>
]]></html><thumbnail_url><![CDATA[https://ascendergame.files.wordpress.com/2016/03/sulur.gif?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[320]]></thumbnail_width><thumbnail_height><![CDATA[180]]></thumbnail_height></oembed>