copyimage.frag 414 Bytes
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
7
8

#include "tools/sampler2d.frag"

uniform sampler2D _colorTexture;
uniform sampler2D _depthTexture;
uniform TextureParameters _textureParameters;

void main() {
9
    vec2 fragCoord = gl_FragCoord.xy * _viewportSizeRCP;
schultezub's avatar
schultezub committed
10
11
12
    gl_FragData[0] = getElement2DNormalized(_colorTexture, _textureParameters, fragCoord);
    gl_FragDepth = getElement2DNormalized(_depthTexture, _textureParameters, fragCoord).z;
}