passCube.fragment.js 944 B

12345678910111213141516171819202122232425262728293031
  1. // Do not edit.
  2. import { ShaderStore } from "../Engines/shaderStore.js";
  3. const name = "passCubePixelShader";
  4. const shader = `varying vec2 vUV;uniform samplerCube textureSampler;
  5. #define CUSTOM_FRAGMENT_DEFINITIONS
  6. void main(void)
  7. {vec2 uv=vUV*2.0-1.0;
  8. #ifdef POSITIVEX
  9. gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x));
  10. #endif
  11. #ifdef NEGATIVEX
  12. gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x));
  13. #endif
  14. #ifdef POSITIVEY
  15. gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x));
  16. #endif
  17. #ifdef NEGATIVEY
  18. gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x));
  19. #endif
  20. #ifdef POSITIVEZ
  21. gl_FragColor=textureCube(textureSampler,vec3(uv,1.001));
  22. #endif
  23. #ifdef NEGATIVEZ
  24. gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001));
  25. #endif
  26. }`;
  27. // Sideeffect
  28. ShaderStore.ShadersStore[name] = shader;
  29. /** @internal */
  30. export const passCubePixelShader = { name, shader };
  31. //# sourceMappingURL=passCube.fragment.js.map