color-frag-params.glsl.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #ifdef requiredDrawBuffers
  36. flat in vec4 vObject;
  37. flat in vec4 vInstance;
  38. flat in vec4 vGroup;
  39. #else
  40. flat in vec4 vColor;
  41. #endif
  42. #endif
  43. #endif
  44. #ifdef dTransparency
  45. varying float vTransparency;
  46. #endif
  47. `;