imageProcessingConfiguration.functions.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { PrepareUniformsForColorCurves } from "./colorCurves.functions.js";
  2. /**
  3. * Prepare the list of uniforms associated with the Image Processing effects.
  4. * @param uniforms The list of uniforms used in the effect
  5. * @param defines the list of defines currently in use
  6. */
  7. export function PrepareUniformsForImageProcessing(uniforms, defines) {
  8. if (defines.EXPOSURE) {
  9. uniforms.push("exposureLinear");
  10. }
  11. if (defines.CONTRAST) {
  12. uniforms.push("contrast");
  13. }
  14. if (defines.COLORGRADING) {
  15. uniforms.push("colorTransformSettings");
  16. }
  17. if (defines.VIGNETTE || defines.DITHER) {
  18. uniforms.push("vInverseScreenSize");
  19. }
  20. if (defines.VIGNETTE) {
  21. uniforms.push("vignetteSettings1");
  22. uniforms.push("vignetteSettings2");
  23. }
  24. if (defines.COLORCURVES) {
  25. PrepareUniformsForColorCurves(uniforms);
  26. }
  27. if (defines.DITHER) {
  28. uniforms.push("ditherIntensity");
  29. }
  30. }
  31. /**
  32. * Prepare the list of samplers associated with the Image Processing effects.
  33. * @param samplersList The list of uniforms used in the effect
  34. * @param defines the list of defines currently in use
  35. */
  36. export function PrepareSamplersForImageProcessing(samplersList, defines) {
  37. if (defines.COLORGRADING) {
  38. samplersList.push("txColorTransform");
  39. }
  40. }
  41. //# sourceMappingURL=imageProcessingConfiguration.functions.js.map