MCPcopy Create free account
hub / github.com/amandaghassaei/OrigamiSimulator / getTextureEncodingFromMap

Function getTextureEncodingFromMap

dependencies/three.js:18200–18228  ·  view source on GitHub ↗
( map, gammaOverrideLinear )

Source from the content-addressed store, hash-verified

18198 }
18199
18200 function getTextureEncodingFromMap( map, gammaOverrideLinear ) {
18201
18202 var encoding;
18203
18204 if ( ! map ) {
18205
18206 encoding = LinearEncoding;
18207
18208 } else if ( map.isTexture ) {
18209
18210 encoding = map.encoding;
18211
18212 } else if ( map.isWebGLRenderTarget ) {
18213
18214 console.warn( "THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead." );
18215 encoding = map.texture.encoding;
18216
18217 }
18218
18219 // add backwards compatibility for WebGLRenderer.gammaInput/gammaOutput parameter, should probably be removed at some point.
18220 if ( encoding === LinearEncoding && gammaOverrideLinear ) {
18221
18222 encoding = GammaEncoding;
18223
18224 }
18225
18226 return encoding;
18227
18228 }
18229
18230 this.getParameters = function ( material, lights, shadows, fog, nClipPlanes, nClipIntersection, object ) {
18231

Callers 1

WebGLProgramsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected