浏览代码
Merge pull request #292 from Unity-Technologies/Branch_DebugMenu2
Merge pull request #292 from Unity-Technologies/Branch_DebugMenu2
Branch debugmenu2/RenderPassXR_Sandbox
GitHub
8 年前
当前提交
fb10c3b0
共有 21 个文件被更改,包括 376 次插入 和 138 次删除
-
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
-
5Assets/ScriptableRenderPipeline/Core/Debugging/DebugMenuUI.cs
-
22Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanel.cs
-
10Assets/ScriptableRenderPipeline/Core/Debugging/DebugPanelUI.cs
-
4Assets/ScriptableRenderPipeline/Core/Debugging/Editor/DebugMenuEditor.cs
-
115Assets/ScriptableRenderPipeline/Core/Shadow/Shadow.cs
-
38Assets/ScriptableRenderPipeline/Core/Shadow/ShadowBase.cs
-
22Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
-
47Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs
-
11Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
57Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/RenderPipelineResources.cs
-
92Assets/ScriptableRenderPipeline/Core/Shadow/Resources/DebugDisplayShadowMap.shader
-
9Assets/ScriptableRenderPipeline/Core/Shadow/Resources.meta
-
0/Assets/ScriptableRenderPipeline/Core/Shadow/Resources/DebugDisplayShadowMap.shader.meta
-
0/Assets/ScriptableRenderPipeline/Core/Shadow/Resources/DebugDisplayShadowMap.shader
|
|||
Shader "Hidden/HDRenderPipeline/DebugDisplayShadowMap" |
|||
Shader "Hidden/ScriptableRenderPipeline/DebugDisplayShadowMap" |
|||
HLSLINCLUDE |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: unitl we go futher in dev |
|||
|
|||
#include "../../../ShaderLibrary/Common.hlsl" |
|||
|
|||
float4 _TextureScaleBias; |
|||
float _TextureSlice; |
|||
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 FragRegular |
|||
|
|||
float4 FragRegular(Varyings input) : SV_Target |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
return SAMPLE_TEXTURE2D_ARRAY(_AtlasTexture, ltc_linear_clamp_sampler, input.texcoord, _TextureSlice).xxxx; |
|||
} |
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
ENDHLSL |
|||
} |
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
output.texcoord = GetFullScreenTriangleTexcoord(input.vertexID) * _TextureScaleBias.xy + _TextureScaleBias.zw; |
|||
Pass |
|||
{ |
|||
Name "VarianceShadow" |
|||
ZTest Off |
|||
Blend One Zero |
|||
Cull Off |
|||
ZWrite On |
|||
return output; |
|||
} |
|||
HLSLPROGRAM |
|||
float4 Frag(Varyings input) : SV_Target |
|||
#pragma vertex Vert |
|||
#pragma fragment FragVariance |
|||
|
|||
float4 FragVariance(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, _TextureSlice).rgba; // Might want something more clever like a channel selector. |
|||
|
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 17c6560a19ee38a488a305b841122612 |
|||
folderAsset: yes |
|||
timeCreated: 1496931301 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue