diff options
Diffstat (limited to 'progs/glsl')
-rw-r--r-- | progs/glsl/CH18-mandel.frag | 2 | ||||
-rw-r--r-- | progs/glsl/multinoise.c | 10 | ||||
-rw-r--r-- | progs/glsl/noise.c | 2 | ||||
-rw-r--r-- | progs/glsl/trirast.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/progs/glsl/CH18-mandel.frag b/progs/glsl/CH18-mandel.frag index a472d81252..a972d68bcf 100644 --- a/progs/glsl/CH18-mandel.frag +++ b/progs/glsl/CH18-mandel.frag @@ -31,7 +31,7 @@ void main() float iter; // for (iter = 0.0; iter < MaxIterations && r2 < 4.0; ++iter) - for (iter = 0.0; iter < 12 && r2 < 4.0; ++iter) + for (iter = 0.0; iter < 12.0 && r2 < 4.0; ++iter) { float tempreal = real; diff --git a/progs/glsl/multinoise.c b/progs/glsl/multinoise.c index 06207f78b5..d504ba1cc4 100644 --- a/progs/glsl/multinoise.c +++ b/progs/glsl/multinoise.c @@ -22,22 +22,22 @@ static const char *FragShaderText[ 4 ] = { "void main()\n" "{\n" " gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].w ) * 0.5 + 0.5;\n" - " gl_FragColor.a = 1;\n" + " gl_FragColor.a = 1.0;\n" "}\n", "void main()\n" "{\n" " gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xw ) * 0.5 + 0.5;\n" - " gl_FragColor.a = 1;\n" + " gl_FragColor.a = 1.0;\n" "}\n", "void main()\n" "{\n" " gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyw ) * 0.5 + 0.5;\n" - " gl_FragColor.a = 1;\n" + " gl_FragColor.a = 1.0;\n" "}\n", "void main()\n" "{\n" " gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyzw ) * 0.5 + 0.5;\n" - " gl_FragColor.a = 1;\n" + " gl_FragColor.a = 1.0;\n" "}\n" }; @@ -194,7 +194,7 @@ LoadAndCompileShader(GLuint shader, const char *text) GLchar log[1000]; GLsizei len; glGetShaderInfoLog(shader, 1000, &len, log); - fprintf(stderr, "noise: problem compiling shader: %s\n", log); + fprintf(stderr, "multinoise: problem compiling shader: %s\n", log); exit(1); } else { diff --git a/progs/glsl/noise.c b/progs/glsl/noise.c index bb024b5012..1148580ff4 100644 --- a/progs/glsl/noise.c +++ b/progs/glsl/noise.c @@ -28,7 +28,7 @@ static const char *FragShaderText = " vec4 p;\n" " p.xy = gl_TexCoord[0].xy;\n" " p.z = Slice;\n" - " p.w = 0;\n" + " p.w = 0.0;\n" " vec4 n = noise4(p * scale);\n" " gl_FragColor = n * Scale + Bias;\n" "}\n"; diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c index 53bd91ef97..857342636d 100644 --- a/progs/glsl/trirast.c +++ b/progs/glsl/trirast.c @@ -179,9 +179,9 @@ Init(void) "\n" "void main() {\n" " vec2 p = gl_FragCoord.xy; \n" - " if (crs(v1 - v0, p - v0) >= 0 && \n" - " crs(v2 - v1, p - v1) >= 0 && \n" - " crs(v0 - v2, p - v2) >= 0) \n" + " if (crs(v1 - v0, p - v0) >= 0.0 && \n" + " crs(v2 - v1, p - v1) >= 0.0 && \n" + " crs(v0 - v2, p - v2) >= 0.0) \n" " gl_FragColor = vec4(1.0); \n" " else \n" " gl_FragColor = vec4(0.5); \n" |