浏览代码

fixed forward SSR

/main
Frédéric Vauchelles 6 年前
当前提交
ae848a9d
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.cs
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl
  3. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceTracing.hlsl

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.cs


children =
{
new DebugUI.Value { displayName = string.Empty, getter = () => "Click in the scene view, or press 'End' key to select the pixel under the mouse in the scene view to debug." },
new DebugUI.Value { displayName = string.Empty, getter = () => "Warning: In forward only mode, debugging information may not be representative of the rendered pixel." },
new DebugUI.Value { displayName = "SSRay Model", getter = () => screenSpaceTracingDebugData.tracingModel }
}
};

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl


CBUFFER_END
TEXTURE2D(_DebugFont); // Debug font to write string in shader
RWStructuredBuffer<ScreenSpaceTracingDebug> _DebugScreenSpaceTracingData;
RWStructuredBuffer<ScreenSpaceTracingDebug> _DebugScreenSpaceTracingData : register(u7);
void GetPropertiesDataDebug(uint paramId, inout float3 result, inout bool needLinearToSRGB)
{

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceTracing.hlsl


hit.positionSS = hitPositionSS;
hit.linearDepth = hitLinearDepth;
bool hitSuccessful = true;
bool hitSuccessful = hitLinearDepth > 0; // Negative means that the hit is behind the camera
if (input.debug)
if (input.debug && _DebugScreenSpaceTracingData[0].tracingModel == -1)
{
ScreenSpaceTracingDebug debug;
ZERO_INITIALIZE(ScreenSpaceTracingDebug, debug);

hit
);
if (input.debug)
if (input.debug && _DebugScreenSpaceTracingData[0].tracingModel == -1)
{
// Build debug structure
ScreenSpaceTracingDebug debug;

正在加载...
取消
保存