浏览代码
Refactored shadow map debug views. Now ShadowMap implementation is responsible for display.
/RenderPassXR_Sandbox
Refactored shadow map debug views. Now ShadowMap implementation is responsible for display.
/RenderPassXR_Sandbox
Julien Ignace
8 年前
当前提交
8db13baa
共有 15 个文件被更改,包括 262 次插入 和 130 次删除
-
2Assets/ScriptableRenderPipeline/Core/Camera/CameraSwitcher.cs
-
28Assets/ScriptableRenderPipeline/Core/Debugging/DebugActionManager.cs
-
40Assets/ScriptableRenderPipeline/Core/Debugging/DebugItemHandler.cs
-
2Assets/ScriptableRenderPipeline/Core/Debugging/DebugItemUI.cs
-
8Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuManager.cs
-
2Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuUI.cs
-
21Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanel.cs
-
4Assets/ScriptableRenderPipeline/Core/Debugging/Editor/DebugMenuEditor.cs
-
72Assets/ScriptableRenderPipeline/Core/Shadow/Shadow.cs
-
25Assets/ScriptableRenderPipeline/Core/Shadow/ShadowBase.cs
-
19Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
-
82Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayShadowMap.shader
-
42Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs
-
11Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
34Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
|
|||
Shader "Hidden/HDRenderPipeline/DebugDisplayShadowMap" |
|||
{ |
|||
HLSLINCLUDE |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: unitl we go futher in dev |
|||
|
|||
#include "../../ShaderLibrary/Common.hlsl" |
|||
|
|||
#define SHADOW_TILEPASS // TODO: Not sure it must be define, ask uygar |
|||
#include "../../ShaderLibrary/Shadow/Shadow.hlsl" |
|||
#undef SHADOW_TILEPASS |
|||
|
|||
float4 _TextureScaleBias; |
|||
SamplerState ltc_linear_clamp_sampler; |
|||
TEXTURE2D_ARRAY(_AtlasTexture); |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
output.texcoord = GetFullScreenTriangleTexcoord(input.vertexID) * _TextureScaleBias.xy + _TextureScaleBias.zw; |
|||
|
|||
return output; |
|||
} |
|||
ENDHLSL |
|||
|
|||
ZWrite Off |
|||
Name "RegularShadow" |
|||
ZWrite On |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: unitl we go futher in dev |
|||
#pragma fragment Frag |
|||
|
|||
#include "../../ShaderLibrary/Common.hlsl" |
|||
|
|||
#define SHADOW_TILEPASS // TODO: Not sure it must be define, ask uygar |
|||
#include "../../ShaderLibrary/Shadow/Shadow.hlsl" |
|||
#undef SHADOW_TILEPASS |
|||
|
|||
SamplerState ltc_linear_clamp_sampler; |
|||
|
|||
float4 _TextureScaleBias; |
|||
|
|||
struct Attributes |
|||
#pragma fragment FragAtlas |
|||
|
|||
float4 FragAtlas(Varyings input) : SV_Target |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
output.texcoord = GetFullScreenTriangleTexcoord(input.vertexID) * _TextureScaleBias.xy + _TextureScaleBias.zw; |
|||
|
|||
return output; |
|||
} |
|||
|
|||
float4 Frag(Varyings input) : SV_Target |
|||
{ |
|||
ShadowContext shadowContext = InitShadowContext(); |
|||
|
|||
// Caution: ShadowContext is define in Shadowcontext.hlsl for current render pipeline. This shader must be in sync with its content else it doesn't work. |
|||
return SAMPLE_TEXTURE2D_ARRAY(_ShadowmapExp_PCF, ltc_linear_clamp_sampler, input.texcoord, 0).xxxx; |
|||
return SAMPLE_TEXTURE2D_ARRAY(_AtlasTexture, ltc_linear_clamp_sampler, input.texcoord, 0).xxxx; |
|||
|
|||
} |
|||
Fallback Off |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue