vs-output.chunk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #if __VERSION__ < 300
  2. #pragma define CC_SURFACES_VARING_MODIFIER varying
  3. #else
  4. #pragma define CC_SURFACES_VARING_MODIFIER out
  5. #endif
  6. #include <shading-entries/data-structures/vs-fs>
  7. // Output item macros
  8. #define VSOutput_worldPos v_worldPos
  9. #define VSOutput_worldNormal v_normal.xyz
  10. #define VSOutput_faceSideSign v_normal.w
  11. #define VSOutput_texcoord v_uv
  12. #if CC_SURFACES_USE_VERTEX_COLOR
  13. #define VSOutput_vertexColor v_color
  14. #endif
  15. #if CC_SURFACES_USE_TANGENT_SPACE
  16. #define VSOutput_worldTangent v_tangent.xyz
  17. #define VSOutput_mirrorNormal v_tangent.w
  18. #endif
  19. #if CC_SURFACES_USE_SECOND_UV
  20. #define VSOutput_texcoord1 v_uv1
  21. #endif
  22. #if CC_USE_LIGHTMAP && !CC_FORWARD_ADD
  23. #define VSOutput_lightMapUV v_luv
  24. #endif
  25. #if CC_RECEIVE_SHADOW
  26. #define VSOutput_shadowBias v_shadowBiasAndProbeId.xy
  27. #endif
  28. #if CC_USE_REFLECTION_PROBE
  29. #define VSOutput_reflectionProbeId v_shadowBiasAndProbeId.z
  30. #if CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND || CC_USE_REFLECTION_PROBE == REFLECTION_PROBE_TYPE_BLEND_AND_SKYBOX
  31. #define VSOutput_reflectionProbeBlendId v_shadowBiasAndProbeId.w
  32. #endif
  33. #if USE_INSTANCING
  34. #define VSOutput_reflectionProbeData v_reflectionProbeData
  35. #endif
  36. #endif
  37. #if CC_USE_FOG != CC_FOG_NONE && !CC_USE_ACCURATE_FOG
  38. #define VSOutput_fogFactor v_fogFactor
  39. #endif
  40. #if CC_SURFACES_TRANSFER_LOCAL_POS
  41. #define VSOutput_localPos v_localPos
  42. #endif
  43. #if CC_SURFACES_TRANSFER_CLIP_POS
  44. #define VSOutput_clipPos v_clipPos
  45. #endif