| 29257 | } |
| 29258 | |
| 29259 | function getTextureEncodingFromMap( map, gammaOverrideLinear ) { |
| 29260 | |
| 29261 | var encoding; |
| 29262 | |
| 29263 | if ( ! map ) { |
| 29264 | |
| 29265 | encoding = THREE.LinearEncoding; |
| 29266 | |
| 29267 | } else if ( map instanceof THREE.Texture ) { |
| 29268 | |
| 29269 | encoding = map.encoding; |
| 29270 | |
| 29271 | } else if ( map instanceof THREE.WebGLRenderTarget ) { |
| 29272 | |
| 29273 | console.warn( "THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead." ); |
| 29274 | encoding = map.texture.encoding; |
| 29275 | |
| 29276 | } |
| 29277 | |
| 29278 | // add backwards compatibility for WebGLRenderer.gammaInput/gammaOutput parameter, should probably be removed at some point. |
| 29279 | if ( encoding === THREE.LinearEncoding && gammaOverrideLinear ) { |
| 29280 | |
| 29281 | encoding = THREE.GammaEncoding; |
| 29282 | |
| 29283 | } |
| 29284 | |
| 29285 | return encoding; |
| 29286 | |
| 29287 | } |
| 29288 | |
| 29289 | this.getParameters = function ( material, lights, fog, nClipPlanes, object ) { |
| 29290 | |