提交 c9f312d5 编写于 作者: M Mr.doob

ShadowMapPlugin to WebGLShadowMap.

上级 7596c190
......@@ -65,14 +65,6 @@ THREE.WebGLRenderer = function ( parameters ) {
this.gammaInput = false;
this.gammaOutput = false;
// shadow map
this.shadowMapEnabled = false;
this.shadowMapType = THREE.PCFShadowMap;
this.shadowMapCullFace = THREE.CullFaceFront;
this.shadowMapDebug = false;
this.shadowMapCascade = false;
// morphs
this.maxMorphTargets = 8;
......@@ -290,6 +282,15 @@ THREE.WebGLRenderer = function ( parameters ) {
this.extensions = extensions;
this.state = state;
// shadow map
this.shadowMap = new THREE.WebGLShadowMap( this, lights, _webglObjects, _webglObjectsImmediate );
this.shadowMapEnabled = false;
this.shadowMapType = THREE.PCFShadowMap;
this.shadowMapCullFace = THREE.CullFaceFront;
this.shadowMapDebug = false;
this.shadowMapCascade = false;
// GPU capabilities
var _maxTextures = _gl.getParameter( _gl.MAX_TEXTURE_IMAGE_UNITS );
......@@ -370,8 +371,6 @@ THREE.WebGLRenderer = function ( parameters ) {
// Plugins
var shadowMapPlugin = new THREE.ShadowMapPlugin( this, lights, _webglObjects, _webglObjectsImmediate );
var spritePlugin = new THREE.SpritePlugin( this, sprites );
var lensFlarePlugin = new THREE.LensFlarePlugin( this, lensFlares );
......@@ -1889,9 +1888,9 @@ THREE.WebGLRenderer = function ( parameters ) {
}
// custom render plugins (pre pass)
//
shadowMapPlugin.render( scene, camera );
this.shadowMap.render( scene, camera );
//
......
/**
* @author alteredq / http://alteredqualia.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE.ShadowMapPlugin = function ( _renderer, _lights, _webglObjects, _webglObjectsImmediate ) {
THREE.WebGLShadowMap = function ( _renderer, _lights, _webglObjects, _webglObjectsImmediate ) {
var _gl = _renderer.context;
......
......@@ -151,9 +151,9 @@
"src/renderers/webgl/WebGLExtensions.js",
"src/renderers/webgl/WebGLProgram.js",
"src/renderers/webgl/WebGLShader.js",
"src/renderers/webgl/WebGLShadowMap.js",
"src/renderers/webgl/WebGLState.js",
"src/renderers/webgl/plugins/LensFlarePlugin.js",
"src/renderers/webgl/plugins/ShadowMapPlugin.js",
"src/renderers/webgl/plugins/SpritePlugin.js"
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册