From 6a823ffbfcda4c843f46e02e83c869d5bc323e25 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Wed, 21 Aug 2019 20:15:53 -0400 Subject: [PATCH] Parallax presets --- cMaterial.java | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cMaterial.java b/cMaterial.java index 14519fe..7f5463d 100644 --- a/cMaterial.java +++ b/cMaterial.java @@ -34,6 +34,7 @@ shadow = val; texture = val; opacity = val; + parallax = val; fakedepth = val; shadowbias = val; } @@ -71,6 +72,7 @@ shadow = mat.shadow; texture = mat.texture; opacity = mat.opacity; + parallax = mat.parallax; fakedepth = mat.fakedepth; shadowbias = mat.shadowbias; @@ -79,7 +81,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 +107,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; } @@ -361,8 +365,10 @@ 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 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.3f, 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