vs-intermediate.chunk 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. struct SurfacesStandardVertexIntermediate
  2. {
  3. //local space
  4. highp vec4 position;
  5. vec3 normal;
  6. #if CC_SURFACES_USE_TANGENT_SPACE
  7. vec4 tangent;
  8. #endif
  9. //other data
  10. #if CC_SURFACES_USE_VERTEX_COLOR
  11. vec4 color;
  12. #endif
  13. vec2 texCoord;
  14. #if CC_SURFACES_USE_SECOND_UV
  15. vec2 texCoord1;
  16. #endif
  17. //transformed
  18. highp vec4 clipPos;
  19. highp vec3 worldPos;
  20. vec4 worldNormal; // a: two side sign
  21. #if CC_SURFACES_USE_TANGENT_SPACE
  22. vec3 worldTangent, worldBinormal;
  23. #endif
  24. //transfered
  25. #if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE
  26. vec4 shadowBiasAndProbeId;
  27. #endif
  28. #if CC_USE_FOG != CC_FOG_NONE && !CC_USE_ACCURATE_FOG
  29. float fogFactor;
  30. #endif
  31. #if CC_USE_LIGHTMAP && !CC_FORWARD_ADD
  32. vec3 lightmapUV;
  33. #endif
  34. };
  35. #if CC_USE_MORPH
  36. #if __VERSION__ < 450
  37. int getVertexId() {
  38. return int(a_vertexId);
  39. }
  40. #else
  41. int getVertexId() {
  42. return gl_VertexIndex; // vulkan convension
  43. }
  44. #endif
  45. #endif