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 sampler2D textureData; |
||||
|
||||
#ifndef GL_ES |
||||
layout(pixel_center_integer) in highp vec4 gl_FragCoord; |
||||
#endif |
||||
|
||||
out highp uvec4 fragmentOutput; |
||||
|
||||
void main() { |
||||
#ifndef GL_ES |
||||
ivec2 pos = ivec2(gl_FragCoord.xy); |
||||
#else |
||||
ivec2 pos = ivec2(gl_FragCoord.xy - vec2(0.5)); |
||||
#endif |
||||
|
||||
fragmentOutput = floatBitsToUint(texelFetch(textureData, pos, level)); |
||||
} |
||||
|
||||
Loading…
Reference in new issue