RT Shading works
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user