|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
// Attributes |
|
|
|
#define REQUIRE_UV_FOR_TESSELATION (defined(TESSELLATION_ON) && defined(_TESSELLATION_DISPLACEMENT)) |
|
|
|
#define REQUIRE_VERTEX_COLOR_FOR_TESSELATION REQUIRE_UV_FOR_TESSELATION |
|
|
|
#define REQUIRE_TANGENT_TO_WORLD (defined(_HEIGHTMAP) && defined(_PIXEL_DISPLACEMENT)) |
|
|
|
#define REQUIRE_TANGENT_TO_WORLD defined(_PIXEL_DISPLACEMENT) |
|
|
|
#define REQUIRE_NORMAL defined(TESSELLATION_ON) || REQUIRE_TANGENT_TO_WORLD || defined(_VERTEX_WIND) || defined(_VERTEX_DISPLACEMENT) |
|
|
|
#define REQUIRE_VERTEX_COLOR (defined(_VERTEX_DISPLACEMENT) || defined(_TESSELLATION_DISPLACEMENT) || (defined(LAYERED_LIT_SHADER) && (defined(_LAYER_MASK_VERTEX_COLOR_MUL) || defined(_LAYER_MASK_VERTEX_COLOR_ADD))) || defined(_VERTEX_WIND)) |
|
|
|
#if defined(TESSELLATION_ON) || REQUIRE_TANGENT_TO_WORLD || defined(_VERTEX_WIND) |
|
|
|
#if REQUIRE_NORMAL |
|
|
|
|
|
|
|
#ifdef _VERTEX_WIND |
|
|
|
#if REQUIRE_VERTEX_COLOR |
|
|
|
#define ATTRIBUTES_NEED_COLOR |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
#define ATTRIBUTES_NEED_TEXCOORD0 |
|
|
|
#define ATTRIBUTES_NEED_TEXCOORD0 // Always present, distortion use TexCoord0 |
|
|
|
#if REQUIRE_UV_FOR_TESSELATION || REQUIRE_TANGENT_TO_WORLD || defined(_ALPHATEST_ON) |
|
|
|
#if defined(_VERTEX_DISPLACEMENT) || REQUIRE_TANGENT_TO_WORLD || defined(_ALPHATEST_ON) || defined(_TESSELLATION_DISPLACEMENT) |
|
|
|
#define ATTRIBUTES_NEED_TEXCOORD1 |
|
|
|
#if defined(_REQUIRE_UV2) || defined(_REQUIRE_UV3) |
|
|
|
#define ATTRIBUTES_NEED_TEXCOORD2 |
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if REQUIRE_VERTEX_COLOR_FOR_TESSELATION |
|
|
|
#define ATTRIBUTES_NEED_COLOR |
|
|
|
#endif |
|
|
|
|
|
|
|
#define VARYINGS_NEED_POSITION_WS // Can be require if we have planar or triplanar distortion |
|
|
|
|
|
|
|
#define VARYINGS_NEED_POSITION_WS // Required to get view vector |
|
|
|
#define VARYINGS_NEED_TEXCOORD0 |
|
|
|
|
|
|
|
#ifdef LAYERED_LIT_SHADER |
|
|
|
#define VARYINGS_NEED_TEXCOORD0 |
|
|
|
#if defined(_REQUIRE_UV2) || defined(_REQUIRE_UV3) |
|
|
|
#define VARYINGS_NEED_TEXCOORD2 |
|
|
|
#endif |
|
|
|
#if defined(_REQUIRE_UV3) |
|
|
|
#define VARYINGS_NEED_TEXCOORD3 |
|
|
|
#endif |
|
|
|
#ifdef ATTRIBUTES_NEED_TEXCOORD2 |
|
|
|
#define VARYINGS_NEED_TEXCOORD2 |
|
|
|
#endif |
|
|
|
#ifdef ATTRIBUTES_NEED_TEXCOORD3 |
|
|
|
#define VARYINGS_NEED_TEXCOORD3 |
|
|
|
#endif |
|
|
|
#if ATTRIBUTES_NEED_COLOR |
|
|
|
#define VARYINGS_NEED_COLOR |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|