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
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: