Add SampleGlobalSDFGradient to get normal vector of Global SDF

This commit is contained in:
Wojciech Figat
2022-03-25 12:53:30 +01:00
parent 1271a337c5
commit 6c4e61a924
3 changed files with 34 additions and 2 deletions

View File

@@ -210,6 +210,7 @@ float4 PS_Debug(Quad_VS2PS input) : SV_Target
float3 color = saturate(hit.StepsCount / 80.0f).xxx;
if (!hit.IsHit())
color.rg *= 0.4f;
//else color.rgb = normalize(SampleGlobalSDFGradient(GlobalSDF, GlobalSDFTex, hit.GetHitPosition(trace)));
return float4(color, 1);
}