bp-cloner
Version:
More info and explanations here - https://doc.babylonjs.com/communityExtensions/clonerSystem
25 lines (24 loc) • 950 B
JavaScript
import { S as e } from "./index-7uRiSnMV.js";
const r = "lodCubePixelShader", o = `precision highp float;const float GammaEncodePowerApprox=1.0/2.2;varying vec2 vUV;uniform samplerCube textureSampler;uniform float lod;uniform int gamma;void main(void)
{vec2 uv=vUV*2.0-1.0;
gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x),lod);
gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x),lod);
gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x),lod);
gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x),lod);
gl_FragColor=textureCube(textureSampler,vec3(uv,1.001),lod);
gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001),lod);
if (gamma==0) {gl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(GammaEncodePowerApprox));}}
`;
e.ShadersStore[r] || (e.ShadersStore[r] = o);