Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
teachmain committed Jan 2, 2024
1 parent e46b150 commit ae2c95d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zenovis/xinxinoptix/DeflMatShader.cu
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ extern "C" __global__ void __closesthit__radiance()
N,
prd->geometryNormal,
-normalize(ray_dir),
mats.thin>0.5f,
(mats.thin>0.5f || mats.doubleSide >0.5f),
next_ray_is_going_inside,
wi,
reflectance,
Expand Down Expand Up @@ -830,7 +830,7 @@ extern "C" __global__ void __closesthit__radiance()
vec3 rd, rs, rt; // captured by lambda

float3 lbrdf = DisneyBSDF::EvaluateDisney2(vec3(1.0f), mats, L, V, T, B, N,prd->geometryNormal,
mats.thin > 0.5f, flag == DisneyBSDF::transmissionEvent ? inToOut : next_ray_is_going_inside, thisPDF, rrPdf,
(mats.thin > 0.5f || mats.doubleSide >0.5f), flag == DisneyBSDF::transmissionEvent ? inToOut : next_ray_is_going_inside, thisPDF, rrPdf,
dot(N, L), rd, rs, rt);

prd->radiance_d = rd;
Expand Down Expand Up @@ -862,7 +862,7 @@ extern "C" __global__ void __closesthit__radiance()
RadiancePRD shadow_prd {};
shadow_prd.seed = prd->seed;
shadow_prd.shadowAttanuation = make_float3(1.0f, 1.0f, 1.0f);
shadow_prd.nonThinTransHit = (mats.thin == false && mats.specTrans > 0) ? 1 : 0;
shadow_prd.nonThinTransHit = ((mats.thin > 0.5f || mats.doubleSide > 0.5f) && mats.specTrans > 0) ? 1 : 0;

shadow_prd.origin = rtgems::offset_ray(P, prd->geometryNormal); // camera space
auto shadingP = rtgems::offset_ray(P + params.cam.eye, prd->geometryNormal); // world space
Expand All @@ -886,7 +886,7 @@ extern "C" __global__ void __closesthit__radiance()
prd->done = true;
}

if(mats.thin<0.5f || mats.doubleSide<0.5f){
if(mats.thin<0.5f && mats.doubleSide<0.5f){
prd->origin = rtgems::offset_ray(P, (next_ray_is_going_inside)? -prd->geometryNormal : prd->geometryNormal);
}
else {
Expand Down

0 comments on commit ae2c95d

Please sign in to comment.