.. | .. |
---|
34 | 34 | shadow = val; |
---|
35 | 35 | texture = val; |
---|
36 | 36 | opacity = val; |
---|
| 37 | + parallax = val; |
---|
37 | 38 | fakedepth = val; |
---|
38 | 39 | shadowbias = val; |
---|
39 | 40 | } |
---|
.. | .. |
---|
71 | 72 | shadow = mat.shadow; |
---|
72 | 73 | texture = mat.texture; |
---|
73 | 74 | opacity = mat.opacity; |
---|
| 75 | + parallax = mat.parallax; |
---|
74 | 76 | fakedepth = mat.fakedepth; |
---|
75 | 77 | shadowbias = mat.shadowbias; |
---|
76 | 78 | |
---|
.. | .. |
---|
79 | 81 | |
---|
80 | 82 | void UpdateMaterial(cMaterial anchor, cMaterial current) |
---|
81 | 83 | { |
---|
82 | | - color *= Factor(anchor.color, current.color); |
---|
| 84 | + //color *= Factor(anchor.color, current.color); |
---|
| 85 | + color = current.color; |
---|
83 | 86 | //if (anchor.saturation == 0) |
---|
84 | 87 | // anchor.saturation = 0.001f; |
---|
85 | 88 | if (anchor.modulation == 0) |
---|
.. | .. |
---|
104 | 107 | shadow *= Factor(anchor.shadow, current.shadow); |
---|
105 | 108 | texture *= Factor(anchor.texture, current.texture); |
---|
106 | 109 | 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; |
---|
107 | 114 | fakedepth *= Factor(anchor.fakedepth, current.fakedepth); |
---|
108 | 115 | shadowbias *= Factor(anchor.shadowbias, current.shadowbias); |
---|
109 | 116 | } |
---|
110 | 117 | |
---|
111 | 118 | float Factor(float anchor, float current) |
---|
112 | 119 | { |
---|
113 | | - if (anchor <= 0) |
---|
114 | | - { |
---|
115 | | - assert anchor > 0; |
---|
116 | | - } |
---|
| 120 | + Grafreed.Assert(anchor > 0); |
---|
117 | 121 | |
---|
118 | 122 | return current / anchor; |
---|
119 | 123 | } |
---|
.. | .. |
---|
358 | 362 | // } |
---|
359 | 363 | |
---|
360 | 364 | float color = 0.5f, modulation /*SATURATION*/ = 0.001f, metalness = 0.001f; |
---|
361 | | - float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1; |
---|
| 365 | + float diffuse = 1f, specular = 0.25f, shininess = 0.75f, shift = 1; |
---|
362 | 366 | float ambient = 0.001f, lightarea = 0.025f, factor = 0.001f, velvet = 0.001f; |
---|
363 | 367 | 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.5f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1; |
---|
365 | 369 | float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f; |
---|
| 370 | + |
---|
| 371 | + float parallax = 0; |
---|
366 | 372 | |
---|
367 | 373 | boolean multiply; |
---|
368 | 374 | |
---|