Commit ff3b77e8 authored by Johannes Braun's avatar Johannes Braun
Browse files

Use proper texture size..

parent 0bd4f5f8
......@@ -222,10 +222,10 @@ void trace(inout Bounce bounce)
void main()
{
int id = 1440 * int(gl_GlobalInvocationID.y) + int(gl_GlobalInvocationID.x);
ivec2 target_size = u_render_target.imageSize();
int id = target_size.x * int(gl_GlobalInvocationID.y) + int(gl_GlobalInvocationID.x);
//Discard pixel if it's not visible to avoid artifacts
ivec2 target_size = u_render_target.imageSize();
if (!(int(gl_GlobalInvocationID.x) < target_size.x && int(gl_GlobalInvocationID.y) < target_size.y))
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment