diff options
Diffstat (limited to 'src/runtime/shaders/compositor_ms4.frag')
-rw-r--r-- | src/runtime/shaders/compositor_ms4.frag | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/shaders/compositor_ms4.frag b/src/runtime/shaders/compositor_ms4.frag index 12dc470..1bbf3d8 100644 --- a/src/runtime/shaders/compositor_ms4.frag +++ b/src/runtime/shaders/compositor_ms4.frag @@ -1,14 +1,15 @@ #version 310 es +precision highp float; in vec2 texCoord; -uniform sampler2DMS tex; +uniform highp sampler2DMS tex; out vec4 fragColor; void main() { - ivec2 tc = ivec2(floor(textureSize(tex) * texCoord)); + ivec2 tc = ivec2(floor(vec2(textureSize(tex)) * texCoord)); vec4 c = texelFetch(tex, tc, 0) + texelFetch(tex, tc, 1) + texelFetch(tex, tc, 2) + texelFetch(tex, tc, 3); c /= 4.0; // This discard, while not necessarily ideal for some GPUs, is necessary to |