1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

ray:: fixed missing mediump

This commit is contained in:
Zeno Rogue 2021-06-01 18:01:48 +02:00
parent dee64d29d4
commit 10bb713422

View File

@ -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"