Normand Briere
2019-08-20 564f4d12d93813b5d680fc24d4f118c3886d96ed
cMaterial.java
....@@ -34,6 +34,7 @@
3434 shadow = val;
3535 texture = val;
3636 opacity = val;
37
+ parallax = val;
3738 fakedepth = val;
3839 shadowbias = val;
3940 }
....@@ -71,6 +72,7 @@
7172 shadow = mat.shadow;
7273 texture = mat.texture;
7374 opacity = mat.opacity;
75
+ parallax = mat.parallax;
7476 fakedepth = mat.fakedepth;
7577 shadowbias = mat.shadowbias;
7678
....@@ -105,16 +107,17 @@
105107 shadow *= Factor(anchor.shadow, current.shadow);
106108 texture *= Factor(anchor.texture, current.texture);
107109 opacity *= Factor(anchor.opacity, current.opacity);
110
+// if (anchor.parallax == 0)
111
+// anchor.parallax = 0.001f;
112
+ //parallax *= Factor(anchor.parallax, current.parallax);
113
+ parallax = current.parallax;
108114 fakedepth *= Factor(anchor.fakedepth, current.fakedepth);
109115 shadowbias *= Factor(anchor.shadowbias, current.shadowbias);
110116 }
111117
112118 float Factor(float anchor, float current)
113119 {
114
- if (anchor <= 0)
115
- {
116
- assert anchor > 0;
117
- }
120
+ Grafreed.Assert(anchor > 0);
118121
119122 return current / anchor;
120123 }
....@@ -362,8 +365,10 @@
362365 float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1;
363366 float ambient = 0.001f, lightarea = 0.025f, factor = 0.001f, velvet = 0.001f;
364367 float sheen = 1f, subsurface = 0.001f, bump = 0.75f, aniso = 0.001f, anisoV = 0.001f;
365
- float cameralight = 0.2f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1;
368
+ float cameralight = 0.3f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1;
366369 float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f;
370
+
371
+ float parallax = 0;
367372
368373 boolean multiply;
369374