File tree Expand file tree Collapse file tree
Assets/Nova/Runtime/Core/Shaders Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,21 @@ VaryingsDrawDepth vert(AttributesDrawDepth input)
177177 SETUP_CUSTOM_COORD (input)
178178 TRANSFER_CUSTOM_COORD (input, output);
179179 #endif
180+
181+ // Vertex Deformation
182+ #ifdef _VERTEX_DEFORMATION_ENABLED
183+ float2 vertexDeformationUVs = TRANSFORM_TEX (input.texcoord.xy, _VertexDeformationMap);
184+ vertexDeformationUVs.x += GET_CUSTOM_COORD (_VertexDeformationMapOffsetXCoord);
185+ vertexDeformationUVs.y += GET_CUSTOM_COORD (_VertexDeformationMapOffsetYCoord);
186+ float vertexDeformationIntensity = _VertexDeformationIntensity + GET_CUSTOM_COORD (_VertexDeformationIntensityCoord);
187+ vertexDeformationIntensity = GetVertexDeformationIntensity (
188+ _VertexDeformationMap, sampler_VertexDeformationMap,
189+ vertexDeformationIntensity,
190+ vertexDeformationUVs,
191+ _VertexDeformationMapChannel,
192+ _VertexDeformationBaseValue);
193+ input.positionOS.xyz += normalize (input.normalOS) * vertexDeformationIntensity;
194+ #endif
180195 InitializeVertexOutputDrawDepth (input, output);
181196
182197 #ifdef _USE_BASE_MAP_UV
You can’t perform that action at this time.
0 commit comments