浏览代码

HDRenderLoop: Missing depth offset for depthOnly/Shadow/forward

/main
Sebastien Lagarde 8 年前
当前提交
3852f3a1
共有 3 个文件被更改,包括 23 次插入5 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSharePass.hlsl
  2. 13
      Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassDepthOnly.hlsl
  3. 13
      Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassForward.hlsl

2
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSharePass.hlsl


output.texCoord2 = input.uv2;
#endif
#ifdef WANT_UV3
#if WANT_UV3
output.texCoord3 = input.uv3;
#endif

13
Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassDepthOnly.hlsl


#error SHADERPASS_is_not_correctly_define
#endif
float4 Frag(PackedVaryings packedInput) : SV_Target
void Frag( PackedVaryings packedInput,
outColor SV_Target
#ifdef _DEPTHOFFSET_ON
float outputDepth : SV_Depth
#endif
)
{
FragInputs input = UnpackVaryings(packedInput);

GetSurfaceAndBuiltinData(input, V, posInput, surfaceData, builtinData);
// TODO: handle cubemap shadow
return float4(0.0, 0.0, 0.0, 0.0);
outColor = float4(0.0, 0.0, 0.0, 0.0);
#ifdef _DEPTHOFFSET_ON
outputDepth = posInput.rawDepth;
#endif
}

13
Assets/ScriptableRenderLoop/HDRenderLoop/ShaderPass/ShaderPassForward.hlsl


#error SHADERPASS_is_not_correctly_define
#endif
float4 Frag(PackedVaryings packedInput) : SV_Target
void Frag( PackedVaryings packedInput,
outColor SV_Target
#ifdef _DEPTHOFFSET_ON
float outputDepth : SV_Depth
#endif
)
{
FragInputs input = UnpackVaryings(packedInput);

float3 bakeDiffuseLighting = GetBakedDiffuseLigthing(surfaceData, builtinData, bsdfData, preLightData);
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting);
return float4(diffuseLighting + specularLighting, builtinData.opacity);
outColor = float4(diffuseLighting + specularLighting, builtinData.opacity);
#ifdef _DEPTHOFFSET_ON
outputDepth = posInput.rawDepth;
#endif
}
正在加载...
取消
保存