PMREMGenerator constructor
PMREMGenerator(
- dynamic renderer
Implementation
PMREMGenerator(renderer) {
// Golden Ratio
PHI = (1 + Math.sqrt(5)) / 2;
INV_PHI = 1 / PHI;
// Vertices of a dodecahedron (except the opposites, which represent the
// same axis), used as axis directions evenly spread on a sphere.
_axisDirections = [
/*@__PURE__*/ Vector3(1, 1, 1),
/*@__PURE__*/ Vector3(-1, 1, 1),
/*@__PURE__*/ Vector3(1, 1, -1),
/*@__PURE__*/ Vector3(-1, 1, -1),
/*@__PURE__*/ Vector3(0, PHI, INV_PHI),
/*@__PURE__*/ Vector3(0, PHI, -INV_PHI),
/*@__PURE__*/ Vector3(INV_PHI, 0, PHI),
/*@__PURE__*/ Vector3(-INV_PHI, 0, PHI),
/*@__PURE__*/ Vector3(PHI, INV_PHI, 0),
/*@__PURE__*/ Vector3(-PHI, INV_PHI, 0)
];
_renderer = renderer;
_pingPongRenderTarget = null;
_lodMax = 0;
_cubeSize = 0;
_lodPlanes = [];
_sizeLods = [];
_sigmas = [];
_blurMaterial = null;
// this._blurMaterial = _getBlurShader(MAX_SAMPLES);
_equirectMaterial = null;
_cubemapMaterial = null;
_compileMaterial(_blurMaterial);
}