From 8f471ab58f8676229d29cde03aba3597d096cf84 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 14 Oct 2019 20:07:35 -0400 Subject: [PATCH] Color/parallax --- cMaterial.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cMaterial.java b/cMaterial.java index 73ae2fb..aa1c881 100644 --- a/cMaterial.java +++ b/cMaterial.java @@ -78,10 +78,11 @@ //Invariants(); } - void UpdateMaterial(cMaterial anchor, cMaterial current) + void UpdateMaterial(cMaterial anchor, cMaterial current, boolean colorparallax) { //color *= Factor(anchor.color, current.color); - color = current.color; + if (colorparallax) + color = current.color; //if (anchor.saturation == 0) // anchor.saturation = 0.001f; if (anchor.modulation == 0) @@ -109,7 +110,8 @@ // if (anchor.parallax == 0) // anchor.parallax = 0.001f; //parallax *= Factor(anchor.parallax, current.parallax); - parallax = current.parallax; + if (colorparallax) + parallax = current.parallax; fakedepth *= Factor(anchor.fakedepth, current.fakedepth); shadowbias *= Factor(anchor.shadowbias, current.shadowbias); } -- Gitblit v1.6.2