RT Shading works

This commit is contained in:
Dynamitos
2024-07-16 15:32:51 +02:00
parent f943407b26
commit 60e74f87b8
14 changed files with 60 additions and 51 deletions
+1 -1
View File
@@ -53,5 +53,5 @@ 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 = getMaterialTextureParameter(0).Sample(getMaterialSamplerParameter(0), params.texCoords[0]).xyz;
hitValue.color = result;
}
+1 -1
View File
@@ -21,5 +21,5 @@ void raygen()
RayPayload payload;
TraceRay(pRayTracingParams.scene, RAY_FLAG_FORCE_OPAQUE, 0xff, 0, 0, 0, rayDesc, payload);
pRayTracingParams.image[int2(LaunchID.xy)] = float4(payload.color, 0.0);
pRayTracingParams.image[int2(LaunchID.xy)] = float4(payload.color, 1.0);
}