Bake up axis

This commit is contained in:
luboslenco
2019-12-06 21:21:25 +01:00
parent acd5702914
commit 3f4134fc37
5 changed files with 11 additions and 4 deletions
Binary file not shown.
+3 -1
View File
@@ -10,7 +10,7 @@ struct Vertex {
struct RayGenConstantBuffer {
float4 v0; // frame, strength, radius, offset
float4 v1;
float4 v1; // envstr, upaxis
float4 v2;
float4 v3;
float4 v4;
@@ -63,6 +63,8 @@ void raygeneration() {
accum = normalize(accum / SAMPLES) * 0.5 + 0.5;
if (constant_buffer.v1.y > 0) accum.xyz = float3(accum.x, accum.z, 1.0 - accum.y);
float3 color = float3(render_target[DispatchRaysIndex().xy].xyz);
if (constant_buffer.v0.x == 0) {
color = accum.xyz;