• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code (Solved) GLSL ES Shader

  • Thread starter Christoffer Karlsson
  • Start date
C

Christoffer Karlsson

Guest
(SOLVED)
Edit: i changed iterations and volstep to int instead of float and got it to work.

Hello, so im playing around with a shader i found on the web and im trying to get it to work but it gives me an error and i cannot figure out why.

The compile error i get is:
Fragment Shader: sha_starfield at line 42 : '<'
Fragment Shader: sha_starfield at line 46 : '<'
Fragment Shader: sha_starfield at line 42 : '<'
Fragment Shader: sha_starfield at line 46 : '<'

thats it :S

part of the code
Code:
for (int r=0; r<volsteps; r++) {
        vec3 p=from+s*dir*.5;
        p=abs(vec3(tile)-mod(p,vec3(tile*2.))); // tiling fold
        float pa,a=pa=0.;
        for (int i=0; i<iterations; i++) {
            p=abs(p)/dot(p,p)-formuparam; // the magic formula
            a+=abs(length(p)-pa); // absolute sum of average change
            pa=length(p);
        }
 
Last edited by a moderator:
Top