River Styx - fixed

Started by Stefan, January 08, 2016, 06:18:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Original Shadertoy demo

Ported to GeeXLab

At first compiler complained: Pixel shader error: C0000: syntax error, unexpected '=', expecting ',' or ';' at token "="

// Home in on the surface by dividing by two and split...
(mapDE(rO + halfwayT*rD) < 0.) ? t.x = halfwayT:t.y = halfwayT;

Fixed by replacing questionmark and colon with commas.
Is there any info about purpose of questionmark and colon?

With Intel renderer i got blank screen. Fixed by removing "inout" from:
// Neat huh? Not mine though...
vec2 rot2D(inout vec2 p, float a)

Judging from a Google search many coders have trouble with inout

Last but least i shortened main function to
uniform vec3      iResolution;     
uniform float     iGlobalTime;     
uniform vec4      iMouse;
// etc.

/* replace this line with original Shadertoy code - don't edit mainImage, fragColor and fragCoord */

void main(){mainImage(gl_FragColor,gl_FragCoord.xy);}