浏览代码
Merge pull request #333 from EvgeniiG/master
Merge pull request #333 from EvgeniiG/master
Add a stencil copy, fix the deferred CS and enable it by default/RenderPassXR_Sandbox
GitHub
7 年前
当前提交
508adf85
共有 9 个文件被更改,包括 183 次插入 和 50 次删除
-
88Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
-
30Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
38Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/shadeopaque.compute
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader
-
3Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl
-
58Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader.meta
|
|||
Shader "Hidden/HDRenderPipeline/CopyStencilBuffer" |
|||
{ |
|||
SubShader |
|||
{ |
|||
Pass |
|||
{ |
|||
Stencil |
|||
{ |
|||
Ref 1 // StencilLightingUsage.SplitLighting |
|||
Comp Equal |
|||
Pass Keep |
|||
} |
|||
|
|||
Cull Off |
|||
ZTest Always |
|||
ZWrite Off |
|||
Blend Off |
|||
|
|||
HLSLPROGRAM |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: until we go further in dev |
|||
// #pragma enable_d3d11_debug_symbols |
|||
|
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
|
|||
#include "../../../../ShaderLibrary/Common.hlsl" |
|||
#include "../../../ShaderConfig.cs.hlsl" |
|||
#include "../../../ShaderVariables.hlsl" |
|||
#include "../../../Lighting/LightDefinition.cs.hlsl" |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_Position; |
|||
}; |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
return output; |
|||
} |
|||
|
|||
// Should use HiS and therefore be faster than a GPU memcpy(). |
|||
float4 Frag(Varyings input) : SV_Target // use SV_StencilRef in D3D 11.3+ |
|||
{ |
|||
return float4(STENCILLIGHTINGUSAGE_SPLIT_LIGHTING, 0, 0, 0); |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7fd941b2d9d2a39429de64bde023932c |
|||
timeCreated: 1499946987 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue