// Structs struct Attributes { float4 positionOS : POSITION; float3 normalOS : NORMAL; // Bending also float2 texcoord1 : TEXCOORD1; // Bending half4 color : COLOR; // Bending UNITY_VERTEX_INPUT_INSTANCE_ID }; struct Varyings { float4 positionCS : SV_POSITION; //UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; //-------------------------------------- // Vertex shader #include "Includes/CTI URP Bending.hlsl" Varyings DepthOnlyVertex(Attributes input) { Varyings output = (Varyings)0; UNITY_SETUP_INSTANCE_ID(input); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); CTI_AnimateVertex( input, #if defined (_BENDINGCOLRSONLY) float4(input.color.rg, input.color.ab), // animParams, #else float4(input.color.rg, input.texcoord1.xy), // animParams, #endif _BaseWindMultipliers ); VertexPositionInputs vertexPosition = GetVertexPositionInputs(input.positionOS.xyz); output.positionCS = vertexPosition.positionCS; return output; } //-------------------------------------- // Fragment shader half4 DepthOnlyFragment(Varyings input) : SV_Target { UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); #if defined(LOD_FADE_CROSSFADE) && !defined(SHADER_API_GLES) LODDitheringTransition(input.positionCS.xyz, unity_LODFade.x); #endif return 0; }