From 10bb71342236f4c677d8619c37bcd17a876b092c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 1 Jun 2021 18:01:48 +0200 Subject: [PATCH] ray:: fixed missing mediump --- raycaster.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/raycaster.cpp b/raycaster.cpp index 83b07f25..f6d72d45 100644 --- a/raycaster.cpp +++ b/raycaster.cpp @@ -341,13 +341,13 @@ void enable_raycaster() { "uniform mediump sampler2D tWall;\n" "uniform mediump float uInvLengthWall;\n" "mediump vec4 getWall(mediump int x, mediump int coord) {\n" - " vec4 result;\n" - " vec4 v = texture2D(tWall, vec2((float(x)+.5) * uInvLengthWall, (float(coord)+.5) / 4.));\n" + " mediump vec4 result;\n" + " mediump vec4 v = texture2D(tWall, vec2((float(x)+.5) * uInvLengthWall, (float(coord)+.5) / 4.));\n" " for(int j=0; j<4; j++) result[j] = (v[j] - .5) * 8.;\n" " return result;\n" " }\n" "mediump int getWallstart(mediump int x) {\n" - " vec4 v = texture2D(tWall, vec2((float(x)+.5) * uInvLengthWall, 0.625));\n" + " mediump vec4 v = texture2D(tWall, vec2((float(x)+.5) * uInvLengthWall, 0.625));\n" " return int(v[0] / uInvLengthWall);\n" " }\n"; } @@ -361,9 +361,9 @@ void enable_raycaster() { "uniform mediump sampler2D tM;\n" "uniform mediump float uInvLengthM;\n" "mediump mat4 getM(mediump int x) {\n" - " mat4 result;\n" + " mediump mat4 result;\n" " for(int i=0; i<4; i++) {\n" - " vec4 v = texture2D(tM, vec2((float(x)+.5) * uInvLengthM, (float(i)+.5) / 4.));\n" + " mediump vec4 v = texture2D(tM, vec2((float(x)+.5) * uInvLengthM, (float(i)+.5) / 4.));\n" " for(int j=0; j<4; j++) result[j][i] = (v[j] - .5) * 8.;\n" " }\n" " return result;\n"