From 64c74ed5162b99fe0d66ee0e40ed71de4ebbd333 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 18 Apr 2023 04:00:52 -0400 Subject: [PATCH] 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 --- data/shaders/ssao.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/shaders/ssao.frag b/data/shaders/ssao.frag index 3caf314c3..3dee11768 100644 --- a/data/shaders/ssao.frag +++ b/data/shaders/ssao.frag @@ -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