浏览代码

Fix up LWUnlit to work with shader library.

/main
Tim Cooper 7 年前
当前提交
d920687b
共有 1 个文件被更改,包括 13 次插入15 次删除
  1. 28
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitPass.template

28
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitPass.template


${ZTest}
${ZWrite}
CGPROGRAM
#pragma target 3.0
#pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
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_instancing
#pragma glsl
#pragma debug
#include "UnityCG.cginc"
// Lighting include is needed because of GI
#include "LWRP/Shaders/LightweightShaderLibrary/Core.hlsl"
#include "LWRP/Shaders/LightweightShaderLibrary/Lighting.hlsl"
#include "CoreRP/ShaderLibrary/Color.hlsl"
#include "ShaderGraphLibrary/Functions.hlsl"
${Defines}

{
float4 position : POSITION;
${Interpolators}
UNITY_VERTEX_OUTPUT_STEREO
};
GraphVertexOutput vert (GraphVertexInput v)

UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.position = UnityObjectToClipPos(v.vertex);
o.position = TransformObjectToHClip(v.vertex.xyz);
fixed4 frag (GraphVertexOutput IN) : SV_Target
half4 frag (GraphVertexOutput IN) : SV_Target
{
${LocalPixelShader}

float Alpha = 0;
${SurfaceOutputRemap}
return fixed4(Color, Alpha);
return half4(Color, Alpha);
ENDCG
ENDHLSL
}
正在加载...
取消
保存