Skip to content

Commit

Permalink
Merged pull request "Always obtain sky color if reflection hit nothin…
Browse files Browse the repository at this point in the history
…g": #342
  • Loading branch information
apanteleev committed Oct 12, 2023
2 parents fec76b1 + f6dfa33 commit cd31f1a
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 cd31f1a

Please sign in to comment.