未验证 提交 692e8204 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15757 from mrdoob/cubetexture

CubeTexture: Use RGBFormat by default.
......@@ -152,6 +152,7 @@
.load( rgbmUrls, function () {
rgbmCubeMap.encoding = THREE.RGBM16Encoding;
rgbmCubeMap.format = THREE.RGBAFormat;
var pmremGenerator = new THREE.PMREMGenerator( rgbmCubeMap );
pmremGenerator.update( renderer );
......@@ -161,6 +162,9 @@
rgbmCubeRenderTarget = pmremCubeUVPacker.CubeUVRenderTarget;
rgbmCubeMap.magFilter = THREE.LinearFilter;
rgbmCubeMap.needsUpdate = true;
pmremGenerator.dispose();
pmremCubeUVPacker.dispose();
......
......@@ -3,12 +3,13 @@
*/
import { Texture } from './Texture.js';
import { CubeReflectionMapping } from '../constants.js';
import { CubeReflectionMapping, RGBFormat } from '../constants.js';
function CubeTexture( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {
images = images !== undefined ? images : [];
mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
format = format !== undefined ? format : RGBFormat;
Texture.call( this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册