Set pathtrace alpha to 1

This commit is contained in:
luboslenco
2025-10-17 18:02:22 +02:00
parent 0a4e474ba0
commit 9e568309da
7 changed files with 6 additions and 6 deletions
@@ -372,11 +372,11 @@ kernel void raytracingKernel(
float a = 1.0 / (constant_buffer.eye.w + 1);
float b = 1.0 - a;
color = color * b + accum * a;
render_target.write(float4(color, 0.0f), tid);
render_target.write(float4(color, 1.0f), tid);
#else
if (constant_buffer.eye.w == 0) {
color = accum;
}
render_target.write(float4(mix(color, accum, 1.0 / 16.0), 0.0f), tid);
render_target.write(float4(mix(color, accum, 1.0 / 16.0), 1.0f), tid);
#endif
}
Binary file not shown.
@@ -373,11 +373,11 @@ kernel void raytracingKernel(
float a = 1.0 / (constant_buffer.eye.w + 1);
float b = 1.0 - a;
color = color * b + accum * a;
render_target.write(float4(color, 0.0f), tid);
render_target.write(float4(color, 1.0f), tid);
#else
if (constant_buffer.eye.w == 0) {
color = accum;
}
render_target.write(float4(mix(color, accum, 1.0 / 16.0), 0.0f), tid);
render_target.write(float4(mix(color, accum, 1.0 / 16.0), 1.0f), tid);
#endif
}
Binary file not shown.
@@ -145,14 +145,14 @@ void raygeneration() {
float a = 1.0 / (constant_buffer.eye.w + 1);
float b = 1.0 - a;
color = color * b + accum * a;
render_target[DispatchRaysIndex().xy] = half4(color, 0.0f);
render_target[DispatchRaysIndex().xy] = half4(color, 1.0f);
#else
if (constant_buffer.eye.w == 0) {
color = accum;
}
render_target[DispatchRaysIndex().xy] = half4(lerp(color, accum, 1.0 / 4.0), 0.0f);
render_target[DispatchRaysIndex().xy] = half4(lerp(color, accum, 1.0 / 4.0), 1.0f);
#endif
}