From f9325048496d7cdbcad233f8a6b84c88e79adcc2 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Tue, 17 Sep 2019 20:11:47 -0400 Subject: [PATCH] Rename link2master to link2support. --- cMaterial.java | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cMaterial.java b/cMaterial.java index 14519fe..73ae2fb 100644 --- a/cMaterial.java +++ b/cMaterial.java @@ -34,13 +34,13 @@ shadow = val; texture = val; opacity = val; + parallax = val; fakedepth = val; shadowbias = val; } public cMaterial(cMaterial mat) { - this(); if (mat != null) { Set(mat); @@ -71,6 +71,7 @@ shadow = mat.shadow; texture = mat.texture; opacity = mat.opacity; + parallax = mat.parallax; fakedepth = mat.fakedepth; shadowbias = mat.shadowbias; @@ -79,7 +80,8 @@ void UpdateMaterial(cMaterial anchor, cMaterial current) { - color *= Factor(anchor.color, current.color); + //color *= Factor(anchor.color, current.color); + color = current.color; //if (anchor.saturation == 0) // anchor.saturation = 0.001f; if (anchor.modulation == 0) @@ -104,16 +106,17 @@ shadow *= Factor(anchor.shadow, current.shadow); texture *= Factor(anchor.texture, current.texture); opacity *= Factor(anchor.opacity, current.opacity); +// if (anchor.parallax == 0) +// anchor.parallax = 0.001f; + //parallax *= Factor(anchor.parallax, current.parallax); + parallax = current.parallax; fakedepth *= Factor(anchor.fakedepth, current.fakedepth); shadowbias *= Factor(anchor.shadowbias, current.shadowbias); } float Factor(float anchor, float current) { - if (anchor <= 0) - { - assert anchor > 0; - } + Grafreed.Assert(anchor > 0); return current / anchor; } @@ -358,11 +361,13 @@ // } float color = 0.5f, modulation /*SATURATION*/ = 0.001f, metalness = 0.001f; - float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1; - float ambient = 0.001f, lightarea = 0.025f, factor = 0.001f, velvet = 0.001f; + float diffuse = 1f, specular = 0.25f, shininess = 0.75f, shift = 1; + float ambient = 0.001f, lightarea = 0.005f, factor = 0.001f, velvet = 0.001f; float sheen = 1f, subsurface = 0.001f, bump = 0.75f, aniso = 0.001f, anisoV = 0.001f; - float cameralight = 0.2f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1; + float cameralight = 0.5f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1; float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f; + + float parallax = 0; boolean multiply; -- Gitblit v1.6.2