some transparency

This commit is contained in:
Dynamitos
2024-07-17 14:34:00 +02:00
parent 12001152d4
commit 67c4ce2f7a
8 changed files with 51 additions and 9 deletions
+4 -1
View File
@@ -53,6 +53,9 @@ void closestHit(inout RayPayload hitValue, in BuiltInTriangleIntersectionAttribu
// gamma correction
result = result / (result + float3(1.0));
result = pow(result, float3(1.0/2.2));
hitValue.color = result;
hitValue.alpha = brdf.getAlpha();
hitValue.intersection_WS = WorldRayOrigin() + RayTCurrent() * WorldRayDirection();
hitValue.normal_WS = mul(params.getTangentToWorld(), brdf.getTangentNormal());
}