xyzz / openmw-android

OpenMW for Android
https://omw.xyz.is/
GNU General Public License v3.0
325 stars 87 forks source link

refraction_fix #101

Closed Sisah2 closed 3 years ago

Sisah2 commented 3 years ago

it fix refraction depth texture precision.

xyzz commented 3 years ago

I've no idea what this does or how to test it, can you explain?

Sisah2 commented 3 years ago

You can test it if you enable water refraction, then use tcl command, fly above some water and look down while flying up. It also fix "wobbly water shores" which was added recently. Here is one old video with this issue. https://youtu.be/_bRjcI_bNLA Recent changes broken it even more.

Sisah2 commented 3 years ago

And here is picture how refraction texture looked on pc vs android https://github.com/ptitSeb/gl4es/issues/328#issuecomment-892103463

Sisah2 commented 3 years ago

Also unrelated thing, problem with shadows seems to be this eyePlaneMat = mat4(gl_EyePlaneS[shadowTextureUnit@shadow_texture_unit_index], gl_EyePlaneT[shadowTextureUnit@shadow_texture_unit_index], gl_EyePlaneR[shadowTextureUnit@shadow_texture_unit_index], gl_EyePlaneQ[shadowTextureUnit@shadow_texture_unit_index]); In shadows_vertex.glsl Those eyePlane* functions always return 0.0 Then sampler 2d shadow is not supported, but using of that may be avoided.