vs.chunk 817 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <surfaces/default-functions/common-vs>
  2. #include <surfaces/module-functions/common-vs>
  3. out highp vec2 v_clip_depth;
  4. void main()
  5. {
  6. SurfacesStandardVertexIntermediate In;
  7. // Local Space
  8. CCSurfacesVertexInput(In);
  9. CCSurfacesVertexAnimation(In);
  10. In.position.xyz = SurfacesVertexModifyLocalPos(In);
  11. SurfacesVertexModifyLocalSharedData(In);
  12. // World Space
  13. CCSurfacesVertexWorldTransform(In);
  14. In.worldPos = SurfacesVertexModifyWorldPos(In);
  15. // Clip Space
  16. In.clipPos = cc_matLightViewProj * vec4(In.worldPos, 1.0);
  17. In.clipPos = SurfacesVertexModifyClipPos(In);
  18. // Other Surfaces Function
  19. SurfacesVertexModifyUV(In);
  20. SurfacesVertexModifySharedData(In);
  21. // Other Data
  22. CCSurfacesVertexTransformUV(In);
  23. CCSurfacesVertexOutput(In);
  24. // Depth
  25. v_clip_depth = In.clipPos.zw;
  26. }