|
@@ -1,8 +1,8 @@
|
|
|
import { WebGLLights } from './WebGLLights.js';
|
|
|
|
|
|
-function WebGLRenderState() {
|
|
|
+function WebGLRenderState( extensions, capabilities ) {
|
|
|
|
|
|
- const lights = new WebGLLights();
|
|
|
+ const lights = new WebGLLights( extensions, capabilities );
|
|
|
|
|
|
const lightsArray = [];
|
|
|
const shadowsArray = [];
|
|
@@ -50,7 +50,7 @@ function WebGLRenderState() {
|
|
|
|
|
|
}
|
|
|
|
|
|
-function WebGLRenderStates() {
|
|
|
+function WebGLRenderStates( extensions, capabilities ) {
|
|
|
|
|
|
let renderStates = new WeakMap();
|
|
|
|
|
@@ -60,7 +60,7 @@ function WebGLRenderStates() {
|
|
|
|
|
|
if ( renderStates.has( scene ) === false ) {
|
|
|
|
|
|
- renderState = new WebGLRenderState();
|
|
|
+ renderState = new WebGLRenderState( extensions, capabilities );
|
|
|
renderStates.set( scene, new WeakMap() );
|
|
|
renderStates.get( scene ).set( camera, renderState );
|
|
|
|
|
@@ -68,7 +68,7 @@ function WebGLRenderStates() {
|
|
|
|
|
|
if ( renderStates.get( scene ).has( camera ) === false ) {
|
|
|
|
|
|
- renderState = new WebGLRenderState();
|
|
|
+ renderState = new WebGLRenderState( extensions, capabilities );
|
|
|
renderStates.get( scene ).set( camera, renderState );
|
|
|
|
|
|
} else {
|