Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Jan 15, 2024
1 parent d81052c commit 09caf17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shaders/ray/closesthit.rchit
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ void main()
v.tex_coord, NoV, payload.cone.width, triangle_lod).x;
}

bool sample_surface = !(material.null_surface || sample_medium);
bool backface = gl_HitKindEXT == gl_HitKindBackFacingTriangleEXT;
float eta = backface ? material.ior / payload.last_ior : payload.media.ior / material.ior;
eta += EPS;
Expand All @@ -273,7 +274,6 @@ void main()
payload.media.phase_g = material.phase_asymmetry_g;
payload.media.ior = material.ior;
payload.media_op = sample_medium ? MEDIA_NO_OP : (backface ? MEDIA_LEAVE : MEDIA_ENTER);
bool sample_surface = !(material.null_surface || sample_medium);

if(sample_surface)
{
Expand Down

0 comments on commit 09caf17

Please sign in to comment.