Quellcode durchsuchen

workaround for shader compile error

WestLangley vor 5 Jahren
Ursprung
Commit
5ee29e21a7
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      examples/jsm/nodes/utils/ColorSpaceNode.js

+ 1 - 1
examples/jsm/nodes/utils/ColorSpaceNode.js

@@ -128,7 +128,7 @@ ColorSpaceNode.Nodes = ( function () {
 
 		"	float maxRGB = max( value.x, max( value.g, value.b ) );",
 		"	float D      = max( maxRange / maxRGB, 1.0 );",
-		"	D            = min( floor( D ) / 255.0, 1.0 );",
+		"	D            = clamp( floor( D ) / 255.0, 0.0, 1.0 );",
 		"	return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );",
 
 		"}"