dist/claygl.es.js
function (renderer, size) {
        if (!renderer.getGLExtension('EXT_shader_texture_lod')) {
            console.warn('Device not support textureCubeLodEXT');
            return;
        }
        if (!this._brdfLookup) {
            this._normalDistribution = cubemapUtil.generateNormalDistribution();
            this._brdfLookup = cubemapUtil.integrateBRDF(renderer, this._normalDistribution);
        }
        var cubemap = this.cubemap;
        if (cubemap.__prefiltered) {
            return;
        }

        var result = cubemapUtil.prefilterEnvironmentMap(
            renderer, cubemap, {
                encodeRGBM: true,
                width: size,
                height: size
            }, this._normalDistribution, this._brdfLookup
        );
        this.cubemap = result.environmentMap;
        this.cubemap.__prefiltered = true;

        cubemap.dispose(renderer);
    }
function (renderer, size) {
        if (!renderer.getGLExtension('EXT_shader_texture_lod')) {
            console.warn('Device not support textureCubeLodEXT');
            return;
        }
        if (!this._brdfLookup) {
            this._normalDistribution = cubemapUtil.generateNormalDistribution();
            this._brdfLookup = cubemapUtil.integrateBRDF(renderer, this._normalDistribution);
        }
        var cubemap = this.cubemap;
        if (cubemap.__prefiltered) {
            return;
        }

        var result = cubemapUtil.prefilterEnvironmentMap(
            renderer, cubemap, {
                encodeRGBM: true,
                width: size,
                height: size
            }, this._normalDistribution, this._brdfLookup
        );
        this.cubemap = result.environmentMap;
        this.cubemap.__prefiltered = true;

        cubemap.dispose(renderer);
    }
function ( renderer , size ) { if ( ! renderer . getGLExtension ( 'EXT_shader_texture_lod' ) ) { console . warn ( 'Device not support textureCubeLodEXT' ) ; return ; } if ( ! this . _brdfLookup ) { this . _normalDistribution = cubemapUtil . generateNormalDistribution ( ) ; this . _brdfLookup = cubemapUtil . integrateBRDF ( renderer , this . _normalDistribution ) ; } var cubemap = this . cubemap ; if ( cubemap . __prefiltered ) { return ; } var result = cubemapUtil . prefilterEnvironmentMap ( renderer , cubemap , { encodeRGBM : true , width : size , height : size } , this . _normalDistribution , this . _brdfLookup ) ; this . cubemap = result . environmentMap ; this . cubemap . __prefiltered = true ; cubemap . dispose ( renderer ) ; }
Do prefitering the cubemap
@param {clay.Renderer} renderer
@param {number} [size=32]
Do prefitering the cubemap