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
....@@ -79,7 +81,8 @@
7981
8082 void UpdateMaterial(cMaterial anchor, cMaterial current)
8183 {
82
- color *= Factor(anchor.color, current.color);
84
+ //color *= Factor(anchor.color, current.color);
85
+ color = current.color;
8386 //if (anchor.saturation == 0)
8487 // anchor.saturation = 0.001f;
8588 if (anchor.modulation == 0)
....@@ -104,16 +107,17 @@
104107 shadow *= Factor(anchor.shadow, current.shadow);
105108 texture *= Factor(anchor.texture, current.texture);
106109 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;
107114 fakedepth *= Factor(anchor.fakedepth, current.fakedepth);
108115 shadowbias *= Factor(anchor.shadowbias, current.shadowbias);
109116 }
110117
111118 float Factor(float anchor, float current)
112119 {
113
- if (anchor <= 0)
114
- {
115
- assert anchor > 0;
116
- }
120
+ Grafreed.Assert(anchor > 0);
117121
118122 return current / anchor;
119123 }
....@@ -361,8 +365,10 @@
361365 float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1;
362366 float ambient = 0.001f, lightarea = 0.025f, factor = 0.001f, velvet = 0.001f;
363367 float sheen = 1f, subsurface = 0.001f, bump = 0.75f, aniso = 0.001f, anisoV = 0.001f;
364
- 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;
365369 float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f;
370
+
371
+ float parallax = 0;
366372
367373 boolean multiply;
368374