MCPcopy Create free account
hub / github.com/divan/gotrace / getToneMappingFunction

Function getToneMappingFunction

page/js/three.js:28576–28605  ·  view source on GitHub ↗
( functionName, toneMapping )

Source from the content-addressed store, hash-verified

28574 }
28575
28576 function getToneMappingFunction( functionName, toneMapping ) {
28577
28578 var toneMappingName;
28579
28580 switch ( toneMapping ) {
28581
28582 case THREE.LinearToneMapping:
28583 toneMappingName = "Linear";
28584 break;
28585
28586 case THREE.ReinhardToneMapping:
28587 toneMappingName = "Reinhard";
28588 break;
28589
28590 case THREE.Uncharted2ToneMapping:
28591 toneMappingName = "Uncharted2";
28592 break;
28593
28594 case THREE.CineonToneMapping:
28595 toneMappingName = "OptimizedCineon";
28596 break;
28597
28598 default:
28599 throw new Error( 'unsupported toneMapping: ' + toneMapping );
28600
28601 }
28602
28603 return "vec3 " + functionName + "( vec3 color ) { return " + toneMappingName + "ToneMapping( color ); }";
28604
28605 }
28606
28607 function generateExtensions( extensions, parameters, rendererExtensions ) {
28608

Callers 1

three.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected