From 7e25e65c44864f5e2c1f8227b41ceb6c0fc5e54f Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 10 Mar 2021 22:39:56 +0100 Subject: Restore depth of field --- shaders/compute.comp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shaders/compute.comp') diff --git a/shaders/compute.comp b/shaders/compute.comp index a47b9ce..cc33aab 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -225,7 +225,7 @@ void main() { vec3 offset = lens_disk.x * cam.right.xyz + lens_disk.y * cam.up.xyz; vec4 proj_plane_pos = cam.first_pixel + jittered_uvs.x * cam.horizontal + jittered_uvs.y * cam.vertical; - ray r = ray(cam.position.xyz, proj_plane_pos.xyz - cam.position.xyz); + ray r = ray(cam.position.xyz + offset, proj_plane_pos.xyz - cam.position.xyz - offset); vec4 out_color = ray_color(r, sample_index); -- cgit v1.3