vs-input.chunk 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //IA Input
  2. layout(location = 0) in vec3 a_position;
  3. layout(location = 1) in vec3 a_normal;
  4. layout(location = 2) in vec2 a_texCoord;
  5. #if CC_SURFACES_USE_TANGENT_SPACE
  6. layout(location = 3) in vec4 a_tangent;
  7. #endif
  8. #if CC_SURFACES_USE_VERTEX_COLOR
  9. in vec4 a_color;
  10. #endif
  11. // Attribute define should depend on system macro, not surface macro
  12. #if CC_SURFACES_USE_SECOND_UV || CC_USE_LIGHTMAP
  13. in vec2 a_texCoord1;
  14. #endif
  15. #if CC_USE_SKINNING
  16. #if __VERSION__ > 310
  17. // strictly speaking this should be u16vec4, but due to poor driver support
  18. // somehow it seems we can get better results on many platforms using u32vec4
  19. layout(location = 4) in u32vec4 a_joints;
  20. #else
  21. #pragma format(RGBA16UI)
  22. layout(location = 4) in vec4 a_joints;
  23. #endif
  24. layout(location = 5) in vec4 a_weights;
  25. #endif
  26. #if USE_INSTANCING
  27. #if CC_USE_BAKED_ANIMATION
  28. in highp vec4 a_jointAnimInfo; // frameID, totalJoints, offset
  29. #endif
  30. in vec4 a_matWorld0;
  31. in vec4 a_matWorld1;
  32. in vec4 a_matWorld2;
  33. #if CC_USE_LIGHTMAP
  34. in vec4 a_lightingMapUVParam;
  35. #endif
  36. #if CC_RECEIVE_SHADOW || CC_USE_REFLECTION_PROBE
  37. in vec4 a_localShadowBiasAndProbeId; // x:shadow bias, y:shadow normal bias, z: reflection probe id, w: blend reflection probe id
  38. #endif
  39. #if CC_USE_REFLECTION_PROBE
  40. in vec4 a_reflectionProbeData; // x:reflection probe blend weight
  41. #endif
  42. #if CC_USE_LIGHT_PROBE
  43. in vec4 a_sh_linear_const_r;
  44. in vec4 a_sh_linear_const_g;
  45. in vec4 a_sh_linear_const_b;
  46. #endif
  47. #endif
  48. #if CC_USE_MORPH
  49. #if __VERSION__ < 450
  50. in float a_vertexId;
  51. #endif
  52. #endif