SPIRV-Cross/shaders-msl/frag/texel-fetch-offset.frag
Hans-Kristian Arntzen eee290a029 MSL: Fix support for texelFetchOffset.
Just apply the offset directly, MSL has no immediate offset parameter.
2018-08-07 15:28:04 +02:00

11 lines
311 B
GLSL

#version 310 es
precision mediump float;
layout(location = 0) out vec4 FragColor;
layout(binding = 0) uniform sampler2D uTexture;
void main()
{
FragColor = texelFetchOffset(uTexture, ivec2(gl_FragCoord.xy), 0, ivec2(1, 1));
FragColor += texelFetchOffset(uTexture, ivec2(gl_FragCoord.xy), 0, ivec2(-1, 1));
}