color-frag-params.glsl.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. export const color_frag_params = `
  2. uniform float uMetalness;
  3. uniform float uRoughness;
  4. uniform float uBumpiness;
  5. #ifdef bumpEnabled
  6. uniform float uBumpFrequency;
  7. uniform float uBumpAmplitude;
  8. #endif
  9. #if defined(dRenderVariant_color)
  10. #if defined(dColorType_uniform)
  11. uniform vec3 uColor;
  12. #elif defined(dColorType_varying)
  13. varying vec4 vColor;
  14. #endif
  15. #ifdef dUsePalette
  16. uniform sampler2D tPalette;
  17. varying float vPaletteV;
  18. #endif
  19. #ifdef dOverpaint
  20. varying vec4 vOverpaint;
  21. #endif
  22. #ifdef dSubstance
  23. varying vec4 vSubstance;
  24. #endif
  25. #elif defined(dRenderVariant_pick)
  26. #if __VERSION__ == 100 || !defined(dVaryingGroup)
  27. #ifdef requiredDrawBuffers
  28. varying vec4 vObject;
  29. varying vec4 vInstance;
  30. varying vec4 vGroup;
  31. #else
  32. varying vec4 vColor;
  33. #endif
  34. #else
  35. // avoid flat until EXT_provoking_vertex is supported
  36. #ifdef requiredDrawBuffers
  37. flat in vec4 vObject;
  38. flat in vec4 vInstance;
  39. flat in vec4 vGroup;
  40. #else
  41. flat in vec4 vColor;
  42. #endif
  43. #endif
  44. #endif
  45. #ifdef dTransparency
  46. varying float vTransparency;
  47. #endif
  48. `;