Buckets:
immErfanrajabee/bd / node_modules /three /src /renderers /shaders /ShaderLib /backgroundCube.glsl.js
| export const vertex = /* glsl */` | |
| varying vec3 vWorldDirection; | |
| #include <common> | |
| void main() { | |
| vWorldDirection = transformDirection( position, modelMatrix ); | |
| #include <begin_vertex> | |
| #include <project_vertex> | |
| gl_Position.z = gl_Position.w; // set z to camera.far | |
| } | |
| `; | |
| export const fragment = /* glsl */` | |
| #ifdef ENVMAP_TYPE_CUBE | |
| uniform samplerCube envMap; | |
| #elif defined( ENVMAP_TYPE_CUBE_UV ) | |
| uniform sampler2D envMap; | |
| #endif | |
| uniform float flipEnvMap; | |
| uniform float backgroundBlurriness; | |
| uniform float backgroundIntensity; | |
| uniform mat3 backgroundRotation; | |
| varying vec3 vWorldDirection; | |
| #include <cube_uv_reflection_fragment> | |
| void main() { | |
| #ifdef ENVMAP_TYPE_CUBE | |
| vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); | |
| #elif defined( ENVMAP_TYPE_CUBE_UV ) | |
| vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); | |
| #else | |
| vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); | |
| #endif | |
| texColor.rgb *= backgroundIntensity; | |
| gl_FragColor = texColor; | |
| #include <tonemapping_fragment> | |
| #include <colorspace_fragment> | |
| } | |
| `; | |
Xet Storage Details
- Size:
- 1.16 kB
- Xet hash:
- aa74f7e0fc21d60e32599ab051b44ec20c7ce7a4984b1ca03aaf42c1e36e3a34
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.