pbrFragmentExtraDeclaration.fx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Input
  2. #ifdef WEBGGPU
  3. layout(location = 0) in vec3 vPositionW;
  4. #else
  5. varying vec3 vPositionW;
  6. #endif
  7. #ifdef NORMAL
  8. #ifdef WEBGGPU
  9. layout(location = 1) in vec3 vNormalW;
  10. #else
  11. varying vec3 vNormalW;
  12. #endif
  13. #if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
  14. #ifdef WEBGGPU
  15. #ifdef WEBGGPU
  16. layout(location = 2) in vec3 vEnvironmentIrradiance;
  17. #else
  18. varying vec3 vEnvironmentIrradiance;
  19. #endif
  20. #else
  21. varying vec3 vEnvironmentIrradiance;
  22. #endif
  23. #endif
  24. #endif
  25. #ifdef VERTEXCOLOR
  26. #ifdef WEBGGPU
  27. layout(location = 3) in vec4 vColor;
  28. #else
  29. varying vec4 vColor;
  30. #endif
  31. #endif
  32. #if DEBUGMODE > 0
  33. #ifdef WEBGGPU
  34. layout(location = 5) in vec4 vClipSpacePosition;
  35. #else
  36. varying vec4 vClipSpacePosition;
  37. #endif
  38. #endif
  39. #ifdef MAINUV1
  40. #ifdef WEBGGPU
  41. layout(location = 6) in vec2 vMainUV1;
  42. #else
  43. varying vec2 vMainUV1;
  44. #endif
  45. #endif
  46. #ifdef MAINUV2
  47. #ifdef WEBGGPU
  48. layout(location = 7) in vec2 vMainUV2;
  49. #else
  50. varying vec2 vMainUV2;
  51. #endif
  52. #endif