11 lines
399 B
Plaintext
11 lines
399 B
Plaintext
#version 460
|
|
layout(local_size_x = 32, local_size_y = 32, local_size_x = 1) in;
|
|
|
|
layout(binding=0,rgba8) restrict uniform image2D colourTexture;
|
|
layout(binding=1) uniform sampler2D depthTexture;
|
|
void main() {
|
|
float d = texture2D(depthTexture, vec2(gl_GlobalInvocationID.xy)/vec2(1024)).x;
|
|
d = 1/d;
|
|
d = d/2;
|
|
imageStore(colourTexture, ivec2(gl_GlobalInvocationID.xy), vec4(d,d,d,1));
|
|
} |