diff options
-rw-r--r-- | src/glean/tglsl1.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index 650659e..3dced3e 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -494,6 +494,7 @@ static const ShaderProgram Programs[] = { { "integer, float arithmetic", NO_VERTEX_SHADER, + "#version 120 \n" "void main() { \n" " int k = 100; \n" " gl_FragColor.x = k * 0.01; \n" @@ -503,7 +504,7 @@ static const ShaderProgram Programs[] = { "} \n", { 1.0, 0.5, 0.25, 0.0 }, DONT_CARE_Z, - FLAG_NONE + FLAG_VERSION_1_20 }, { @@ -524,7 +525,7 @@ static const ShaderProgram Programs[] = { "void main() { \n" " int i = 15, j = 6; \n" " int k = i / j; \n" - " gl_FragColor = vec4(k * 0.1); \n" + " gl_FragColor = vec4(float(k) * 0.1); \n" "} \n", { 0.2, 0.2, 0.2, 0.2 }, DONT_CARE_Z, @@ -537,10 +538,10 @@ static const ShaderProgram Programs[] = { "// as above, but prevent compile-time evaluation \n" "uniform vec4 uniform1; \n" "void main() { \n" - " int i = int(15 * uniform1.x); \n" + " int i = int(15.0 * uniform1.x); \n" " int j = 6; \n" " int k = i / j; \n" - " gl_FragColor = vec4(k * 0.1); \n" + " gl_FragColor = vec4(float(k) * 0.1); \n" "} \n", { 0.2, 0.2, 0.2, 0.2 }, DONT_CARE_Z, |