您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
120 行
2.4 KiB
120 行
2.4 KiB
SubShader
|
|
{
|
|
Tags{"RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline"}
|
|
|
|
LOD ${LOD}
|
|
|
|
Pass
|
|
{
|
|
Tags{"LightMode" = "LightweightForward"}
|
|
${Tags}
|
|
${Blending}
|
|
${Culling}
|
|
${ZTest}
|
|
${ZWrite}
|
|
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
|
|
#pragma multi_compile _ _SINGLE_DIRECTIONAL_LIGHT _SINGLE_SPOT_LIGHT _SINGLE_POINT_LIGHT
|
|
#pragma multi_compile _ LIGHTWEIGHT_LINEAR
|
|
#pragma multi_compile _ UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON STEREO_MULTIVIEW_ON
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ _LIGHT_PROBES_ON
|
|
#pragma multi_compile _ _HARD_SHADOWS _SOFT_SHADOWS _HARD_SHADOWS_CASCADES _SOFT_SHADOWS_CASCADES
|
|
#pragma multi_compile _ _VERTEX_LIGHTS
|
|
#pragma multi_compile_fog
|
|
#pragma multi_compile_instancing
|
|
|
|
#pragma vertex Vertex
|
|
#pragma fragment LightweightFragmentFastBlinn
|
|
#pragma glsl
|
|
#pragma debug
|
|
|
|
${Defines}
|
|
|
|
#include "UnityCG.cginc"
|
|
|
|
#define UNITY_SAMPLE_TEX2D(tex, coord) LIGHTWEIGHT_GAMMA_TO_LINEAR4(tex.Sample (sampler##tex,coord))
|
|
|
|
#define VERTEX_CUSTOM \
|
|
${VertexShaderBody}
|
|
|
|
//#define VERTINPUT_CUSTOM \
|
|
//${VertexInputs}
|
|
|
|
#define VERTOUTPUT_CUSTOM \
|
|
${VertexOutputs}
|
|
|
|
#include "CGIncludes/LightweightFastBlinn.cginc"
|
|
|
|
${ShaderPropertyUsages}
|
|
${ShaderFunctions}
|
|
|
|
void DefineSurface(VertOutput i, inout SurfaceFastBlinn o)
|
|
{
|
|
${PixelShaderBody}
|
|
}
|
|
|
|
ENDCG
|
|
}
|
|
|
|
Pass
|
|
{
|
|
Tags{"Lightmode" = "ShadowCaster"}
|
|
ZWrite On ZTest LEqual
|
|
|
|
CGPROGRAM
|
|
#pragma target 2.0
|
|
#include "UnityCG.cginc"
|
|
#include "CGIncludes/LightweightPass.cginc"
|
|
#pragma vertex shadowVert
|
|
#pragma fragment shadowFrag
|
|
ENDCG
|
|
}
|
|
|
|
Pass
|
|
{
|
|
Tags{"Lightmode" = "DepthOnly"}
|
|
ZWrite On
|
|
|
|
CGPROGRAM
|
|
#pragma target 2.0
|
|
#include "UnityCG.cginc"
|
|
#include "CGIncludes/LightweightPass.cginc"
|
|
#pragma vertex depthVert
|
|
#pragma fragment depthFrag
|
|
ENDCG
|
|
}
|
|
|
|
/*Pass
|
|
{
|
|
Tags{ "LightMode" = "Meta" }
|
|
|
|
Cull Off
|
|
|
|
CGPROGRAM
|
|
#define UNITY_SETUP_BRDF_INPUT SpecularSetup
|
|
|
|
#pragma shader_feature _EMISSION
|
|
#pragma shader_feature _SPECGLOSSMAP
|
|
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
|
#pragma shader_feature ___ _DETAIL_MULX2
|
|
#pragma shader_feature EDITOR_VISUALIZATION
|
|
|
|
#include "UnityCG.cginc"
|
|
#include "CGIncludes/LightweightPass.cginc"
|
|
#pragma vertex Vert_Meta
|
|
#pragma fragment frag_meta_ld
|
|
|
|
${ShaderPropertyUsages}
|
|
${ShaderFunctions}
|
|
|
|
void DefineSurfaceMeta(VertOutput_Meta i, inout SurfaceFastBlinn o)
|
|
{
|
|
${PixelShaderBody}
|
|
}
|
|
|
|
ENDCG
|
|
}*/
|
|
}
|