Author Topic: River Styx - fixed  (Read 3741 times)

0 Members and 1 Guest are viewing this topic.

Stefan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4398
    • View Profile
River Styx - fixed
« on: January 08, 2016, 06:18:25 PM »
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
Code: [Select]
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);}


« Last Edit: January 08, 2016, 06:21:02 PM by Stefan »