some transparency

This commit is contained in:
Dynamitos committed 2024-07-17 14:34:00 +02:00
1 parent 12001152d4
commit 67c4ce2f7a
8 files changed
+51 -9

No files matched your search

+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());
}