mirror of https://github.com/mosra/magnum.git
2 changed files with 12 additions and 0 deletions
@ -1,12 +1,18 @@ |
|||||||
uniform highp int level; |
uniform highp int level; |
||||||
uniform highp sampler2D textureData; |
uniform highp sampler2D textureData; |
||||||
|
|
||||||
|
#ifndef GL_ES |
||||||
layout(pixel_center_integer) in highp vec4 gl_FragCoord; |
layout(pixel_center_integer) in highp vec4 gl_FragCoord; |
||||||
|
#endif |
||||||
|
|
||||||
out highp uvec4 fragmentOutput; |
out highp uvec4 fragmentOutput; |
||||||
|
|
||||||
void main() { |
void main() { |
||||||
|
#ifndef GL_ES |
||||||
ivec2 pos = ivec2(gl_FragCoord.xy); |
ivec2 pos = ivec2(gl_FragCoord.xy); |
||||||
|
#else |
||||||
|
ivec2 pos = ivec2(gl_FragCoord.xy - vec2(0.5)); |
||||||
|
#endif |
||||||
|
|
||||||
fragmentOutput = floatBitsToUint(texelFetch(textureData, pos, level)); |
fragmentOutput = floatBitsToUint(texelFetch(textureData, pos, level)); |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue