UNPKG

three

Version:

JavaScript 3D library

20 lines (13 loc) 385 B
export default /* glsl */` uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; void main() { vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); gl_FragColor = mapTexelToLinear( texColor ); gl_FragColor.a *= opacity; #include <tonemapping_fragment> #include <encodings_fragment> } `;