ncannasse 8 rokov pred
rodič
commit
504e01c4bf

+ 1 - 1
h2d/filter/ColorMatrix.hx

@@ -23,7 +23,7 @@ class ColorMatrix extends Filter {
 	public static function grayed() {
 	public static function grayed() {
 		var m = new h3d.Matrix();
 		var m = new h3d.Matrix();
 		m.identity();
 		m.identity();
-		m.colorSaturation(0);
+		m.colorSaturation(-1);
 		return new ColorMatrix(m);
 		return new ColorMatrix(m);
 	}
 	}
 
 

+ 1 - 1
hxd/inspect/ScenePanel.hx

@@ -362,7 +362,7 @@ class ScenePanel extends Panel {
 			var m = new h3d.shader.ColorMatrix();
 			var m = new h3d.shader.ColorMatrix();
 			m.matrix.identity();
 			m.matrix.identity();
 			m.matrix.colorHue(0.1);
 			m.matrix.colorHue(0.1);
-			m.matrix.colorBrightness(0.2);
+			m.matrix.colorLightness(0.2);
 			currentPickShader = m;
 			currentPickShader = m;
 			currentPick.material.mainPass.addShader(m);
 			currentPick.material.mainPass.addShader(m);
 		}
 		}

+ 1 - 1
samples/Mask.hx

@@ -41,7 +41,7 @@ class Mask extends hxd.App {
 		cache.freezed = (time % 2.) > 1;
 		cache.freezed = (time % 2.) > 1;
 		cache.colorMatrix.identity();
 		cache.colorMatrix.identity();
 		cache.colorMatrix.colorHue(time);
 		cache.colorMatrix.colorHue(time);
-		cache.colorMatrix.colorSaturation(cache.freezed ? 0 : 1);
+		cache.colorMatrix.colorSaturation(cache.freezed ? -1 : 0);
 	}
 	}
 
 
 	static function main() {
 	static function main() {

+ 2 - 2
samples/Pbr.hx

@@ -771,9 +771,9 @@ class Pbr extends hxd.App {
 		var color = new h3d.Vector(1, 0, 0);
 		var color = new h3d.Vector(1, 0, 0);
 		var m = new h3d.Matrix();
 		var m = new h3d.Matrix();
 		m.identity();
 		m.identity();
-		m.colorSaturation(saturation);
+		m.colorSaturation(saturation - 1);
 		m.colorHue(hue);
 		m.colorHue(hue);
-		m.colorBrightness(brightness);
+		m.colorLightness(brightness);
 		color.transform3x4(m);
 		color.transform3x4(m);
 		color.setColor(color.toColor()); // saturate
 		color.setColor(color.toColor()); // saturate