PMREMGenerator constructor
PMREMGenerator(
- AngleRenderer renderer
Implementation
PMREMGenerator(AngleRenderer renderer) {
// Golden Ratio
phi = (1 + math.sqrt(5)) / 2;
invPhi = 1 / phi;
// Vertices of a dodecahedron (except the opposites, which represent the
// same axis), used as axis directions evenly spread on a sphere.
_axisDirections = [
Vector3(-phi, invPhi, 0),
Vector3(phi, invPhi, 0),
Vector3(-invPhi, 0, phi),
Vector3(invPhi, 0, phi),
Vector3(0, phi, -invPhi),
Vector3(0, phi, invPhi),
Vector3(-1, 1, -1),
Vector3(1, 1, -1),
Vector3(-1, 1, 1),
Vector3(1, 1, 1),
];
_renderer = renderer;
_pingPongRenderTarget = null;
_lodMax = 0;
_cubeSize = 0;
_lodPlanes = [];
_sizeLods = [];
_sigmas = [];
_compileMaterial(_blurMaterial);
}