您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
61 行
1.3 KiB
61 行
1.3 KiB
Pass
|
|
{
|
|
Tags{"LightMode" = "LightweightForward"}
|
|
${Tags}
|
|
${Blending}
|
|
${Culling}
|
|
${ZTest}
|
|
${ZWrite}
|
|
|
|
HLSLPROGRAM
|
|
// Required to compile gles 2.0 with standard srp library
|
|
#pragma prefer_hlslcc gles
|
|
#pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ENABLE STEREO_MULTIVIEW_ENABLE
|
|
#pragma multi_compile_fog
|
|
#pragma multi_compile_instancing
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
// Lighting include is needed because of GI
|
|
#include "LWRP/ShaderLibrary/Core.hlsl"
|
|
#include "LWRP/ShaderLibrary/Lighting.hlsl"
|
|
#include "CoreRP/ShaderLibrary/Color.hlsl"
|
|
#include "ShaderGraphLibrary/Functions.hlsl"
|
|
|
|
${Defines}
|
|
|
|
${Graph}
|
|
|
|
struct GraphVertexOutput
|
|
{
|
|
float4 position : POSITION;
|
|
${Interpolators}
|
|
};
|
|
|
|
GraphVertexOutput vert (GraphVertexInput v)
|
|
{
|
|
v = PopulateVertexData(v);
|
|
|
|
GraphVertexOutput o;
|
|
o.position = TransformObjectToHClip(v.vertex.xyz);
|
|
${VertexShader}
|
|
return o;
|
|
}
|
|
|
|
half4 frag (GraphVertexOutput IN) : SV_Target
|
|
{
|
|
${LocalPixelShader}
|
|
|
|
SurfaceInputs surfaceInput;
|
|
${SurfaceInputs}
|
|
|
|
SurfaceDescription surf = PopulateSurfaceData(surfaceInput);
|
|
float3 Color = 0;
|
|
float Alpha = 0;
|
|
${SurfaceOutputRemap}
|
|
|
|
return half4(Color, Alpha);
|
|
}
|
|
ENDHLSL
|
|
}
|