Skip to content

Commit

Permalink
Always obtain sky color if reflection hit nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
res2k committed Oct 8, 2023
1 parent ce0d446 commit f6dfa33
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/refresh/vkpt/shader/reflect_refract.rgen
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,10 @@ main()
// Reflection ray hit the sky - store an empty surface into the G-buffer,
// blend the environment under the transparency.

if(found_intersection(ray_payload_geometry))
{
vec3 env = env_map(direction, false);
env *= global_ubo.pt_env_scale;

transparent = alpha_blend(transparent, vec4(env * throughput, 1));
}
vec3 env = env_map(direction, false);
env *= global_ubo.pt_env_scale;

transparent = alpha_blend(transparent, vec4(env * throughput, 1));

material_id = (primary_medium << MATERIAL_LIGHT_STYLE_SHIFT) & MATERIAL_LIGHT_STYLE_MASK;

Expand Down

0 comments on commit f6dfa33

Please sign in to comment.