您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
39 行
1.3 KiB
39 行
1.3 KiB
#ifndef SHADERPASS
|
|
#error Undefine_SHADERPASS
|
|
#endif
|
|
|
|
// This first set of define allow to say which attributes will be use by the mesh in the vertex and domain shader (for tesselation)
|
|
|
|
// Attributes
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TEXCOORD0
|
|
#define ATTRIBUTES_NEED_TANGENT // will be filled by ApplyPreVertexModification()
|
|
|
|
#if SHADERPASS == SHADERPASS_LIGHT_TRANSPORT
|
|
#define ATTRIBUTES_NEED_TEXCOORD1
|
|
#define ATTRIBUTES_NEED_TEXCOORD2
|
|
#endif
|
|
|
|
// Varying - Use for pixel shader
|
|
// This second set of define allow to say which varyings will be output in the vertex (no more tesselation)
|
|
#define VARYINGS_NEED_POSITION_WS
|
|
#define VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#define VARYINGS_NEED_TEXCOORD0
|
|
|
|
#ifdef _DOUBLESIDED_ON
|
|
#define VARYINGS_NEED_CULLFACE
|
|
#endif
|
|
|
|
#if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
|
|
#define ENABLE_TERRAIN_PERPIXEL_NORMAL
|
|
#endif
|
|
|
|
#ifdef ENABLE_TERRAIN_PERPIXEL_NORMAL
|
|
// With per-pixel normal enabled, tangent space is created in the pixel shader.
|
|
#undef ATTRIBUTES_NEED_NORMAL
|
|
#undef ATTRIBUTES_NEED_TANGENT
|
|
#undef VARYINGS_NEED_TANGENT_TO_WORLD
|
|
#endif
|
|
|
|
// This include will define the various Attributes/Varyings structure
|
|
#include "../../ShaderPass/VaryingMesh.hlsl"
|