declare some ssao.frag variables as highp to avoid precision issues (#4860)

this fixes opaque shadow rendering on drivers that implement
mediump as 16bit

fixes #4855

Signed-off-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
This commit is contained in:
Mike Blumenkrantz 2023-04-18 04:00:52 -04:00 committed by GitHub
parent 94fa3c8a63
commit 64c74ed516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ void main(void)
{
vec2 uv = gl_FragCoord.xy / u_screen;
float lineardepth = textureLod(dtex, uv, 0.).x;
int x = int(gl_FragCoord.x), y = int(gl_FragCoord.y);
highp int x = int(gl_FragCoord.x), y = int(gl_FragCoord.y);
vec3 FragPos = getXcYcZc(x, y, lineardepth);
// get the normal of current fragment