diff --git a/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js b/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js index e505502c9f1d675a995f5df6bea8bded8e8b8e4c..96414473e7b7055c01bad38da063d4844a3f1041 100644 --- a/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js +++ b/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js @@ -98,35 +98,6 @@ vec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) { #define v6 0.0038 #define m6 4.0 -float roughnessToVariance(float roughness) { - float variance = 0.0; - if (roughness >= r1) { - variance = (r0 - roughness) * (v1 - v0) / (r0 - r1) + v0; - } else if (roughness >= r4) { - variance = (r1 - roughness) * (v4 - v1) / (r1 - r4) + v1; - } else if (roughness >= r5) { - variance = (r4 - roughness) * (v5 - v4) / (r4 - r5) + v4; - } else { - float roughness2 = roughness * roughness; - variance = 1.79 * roughness2 * roughness2; - } - return variance; -} - -float varianceToRoughness(float variance) { - float roughness = 0.0; - if (variance >= v1) { - roughness = (v0 - variance) * (r1 - r0) / (v0 - v1) + r0; - } else if (variance >= v4) { - roughness = (v1 - variance) * (r4 - r1) / (v1 - v4) + r1; - } else if (variance >= v5) { - roughness = (v4 - variance) * (r5 - r4) / (v4 - v5) + r4; - } else { - roughness = pow(0.559 * variance, 0.25);// 0.559 = 1.0 / 1.79 - } - return roughness; -} - float roughnessToMip(float roughness) { float mip = 0.0; if (roughness >= r1) {