fixed NanoVDB froxel injection leaving extinction unchanged

This commit is contained in:
myT 2024-12-15 20:09:23 +01:00
parent 7e203ea6ec
commit a1efd4cbf9

View file

@ -343,7 +343,7 @@ void cs(uint3 id : SV_DispatchThreadID)
float3 inScattered = lerp(extResult1.inScatteredLight, extResult2.inScatteredLight, t);
materialTextureA[id] += float4(scatter.xxx, absorption);
materialTextureC[id] += coverage;
scatterExtTexture[id] += float4(scatter * inScattered, 0);
scatterExtTexture[id] += float4(scatter * inScattered, extinction);
}
if(emResult1.sum > 0.0 || emResult2.sum > 0.0)
@ -384,7 +384,7 @@ void cs(uint3 id : SV_DispatchThreadID)
float coverage = float(extResult.sampleCount) / float(extResult.maxSampleCount);
materialTextureA[id] += float4(scatter.xxx, absorption);
materialTextureC[id] += coverage;
scatterExtTexture[id] += float4(scatter * extResult.inScatteredLight, 0);
scatterExtTexture[id] += float4(scatter * extResult.inScatteredLight, extinction);
}
if(emResult.sum > 0.0)