@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
32 lines • 1.16 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../Engines/shaderStore.js";
const name = "lodCubePixelShader";
const shader = `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));}}
`;
// Sideeffect
if (!ShaderStore.ShadersStore[name]) {
ShaderStore.ShadersStore[name] = shader;
}
/** @internal */
export const lodCubePixelShader = { name, shader };
//# sourceMappingURL=lodCube.fragment.js.map