您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
62 行
1.5 KiB
62 行
1.5 KiB
Shader "Hidden/HDRenderPipeline/CombineLighting"
|
|
{
|
|
Properties
|
|
{
|
|
[HideInInspector] _StencilMask("_StencilMask", Int) = 7
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
Pass
|
|
{
|
|
Stencil
|
|
{
|
|
ReadMask [_StencilMask]
|
|
Ref 1 // StencilLightingUsage.SplitLighting
|
|
Comp Equal
|
|
Pass Keep
|
|
}
|
|
|
|
Cull Off
|
|
ZTest Always
|
|
ZWrite Off
|
|
Blend One One // Additive
|
|
|
|
HLSLPROGRAM
|
|
#pragma target 4.5
|
|
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
|
|
// #pragma enable_d3d11_debug_symbols
|
|
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
|
|
#include "CoreRP/ShaderLibrary/Common.hlsl"
|
|
|
|
TEXTURE2D(_IrradianceSource);
|
|
|
|
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;
|
|
}
|
|
|
|
float4 Frag(Varyings input) : SV_Target
|
|
{
|
|
return LOAD_TEXTURE2D(_IrradianceSource, input.positionCS.xy);
|
|
}
|
|
ENDHLSL
|
|
}
|
|
}
|
|
Fallback Off
|
|
}
|