|
@@ -1,7 +1,7 @@
|
|
import { WebGLUniforms } from './WebGLUniforms.js';
|
|
import { WebGLUniforms } from './WebGLUniforms.js';
|
|
import { WebGLShader } from './WebGLShader.js';
|
|
import { WebGLShader } from './WebGLShader.js';
|
|
import { ShaderChunk } from '../shaders/ShaderChunk.js';
|
|
import { ShaderChunk } from '../shaders/ShaderChunk.js';
|
|
-import { RGBFormat, NoToneMapping, AddOperation, MixOperation, MultiplyOperation, CubeRefractionMapping, CubeUVRefractionMapping, CubeUVReflectionMapping, CubeReflectionMapping, PCFSoftShadowMap, PCFShadowMap, VSMShadowMap, ACESFilmicToneMapping, CineonToneMapping, CustomToneMapping, ReinhardToneMapping, LinearToneMapping, GammaEncoding, sRGBEncoding, LinearEncoding, GLSL3 } from '../../constants.js';
|
|
|
|
|
|
+import { RGBFormat, NoToneMapping, AddOperation, MixOperation, MultiplyOperation, CubeRefractionMapping, CubeUVRefractionMapping, CubeUVReflectionMapping, CubeReflectionMapping, PCFSoftShadowMap, PCFShadowMap, VSMShadowMap, ACESFilmicToneMapping, CineonToneMapping, CustomToneMapping, ReinhardToneMapping, LinearToneMapping, sRGBEncoding, LinearEncoding, GLSL3 } from '../../constants.js';
|
|
|
|
|
|
let programIdCount = 0;
|
|
let programIdCount = 0;
|
|
|
|
|
|
@@ -27,8 +27,6 @@ function getEncodingComponents( encoding ) {
|
|
return [ 'Linear', '( value )' ];
|
|
return [ 'Linear', '( value )' ];
|
|
case sRGBEncoding:
|
|
case sRGBEncoding:
|
|
return [ 'sRGB', '( value )' ];
|
|
return [ 'sRGB', '( value )' ];
|
|
- case GammaEncoding:
|
|
|
|
- return [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ];
|
|
|
|
default:
|
|
default:
|
|
console.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding );
|
|
console.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding );
|
|
return [ 'Linear', '( value )' ];
|
|
return [ 'Linear', '( value )' ];
|
|
@@ -389,9 +387,6 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
const envMapModeDefine = generateEnvMapModeDefine( parameters );
|
|
const envMapModeDefine = generateEnvMapModeDefine( parameters );
|
|
const envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );
|
|
const envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );
|
|
|
|
|
|
-
|
|
|
|
- const gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0;
|
|
|
|
-
|
|
|
|
const customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );
|
|
const customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );
|
|
|
|
|
|
const customDefines = generateDefines( defines );
|
|
const customDefines = generateDefines( defines );
|
|
@@ -443,8 +438,6 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
|
|
|
parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '',
|
|
parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '',
|
|
|
|
|
|
- '#define GAMMA_FACTOR ' + gammaFactorDefine,
|
|
|
|
-
|
|
|
|
'#define MAX_BONES ' + parameters.maxBones,
|
|
'#define MAX_BONES ' + parameters.maxBones,
|
|
( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',
|
|
( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',
|
|
( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',
|
|
( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',
|
|
@@ -593,8 +586,6 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
|
|
|
customDefines,
|
|
customDefines,
|
|
|
|
|
|
- '#define GAMMA_FACTOR ' + gammaFactorDefine,
|
|
|
|
-
|
|
|
|
( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',
|
|
( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',
|
|
( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',
|
|
( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',
|
|
|
|
|