.. | .. |
---|
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 | |
---|
.. | .. |
---|
105 | 107 | shadow *= Factor(anchor.shadow, current.shadow); |
---|
106 | 108 | texture *= Factor(anchor.texture, current.texture); |
---|
107 | 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; |
---|
108 | 114 | fakedepth *= Factor(anchor.fakedepth, current.fakedepth); |
---|
109 | 115 | shadowbias *= Factor(anchor.shadowbias, current.shadowbias); |
---|
110 | 116 | } |
---|
111 | 117 | |
---|
112 | 118 | float Factor(float anchor, float current) |
---|
113 | 119 | { |
---|
114 | | - if (anchor <= 0) |
---|
115 | | - { |
---|
116 | | - assert anchor > 0; |
---|
117 | | - } |
---|
| 120 | + Grafreed.Assert(anchor > 0); |
---|
118 | 121 | |
---|
119 | 122 | return current / anchor; |
---|
120 | 123 | } |
---|
.. | .. |
---|
364 | 367 | float sheen = 1f, subsurface = 0.001f, bump = 0.75f, aniso = 0.001f, anisoV = 0.001f; |
---|
365 | 368 | float cameralight = 0.3f, diffuseness = 0.001f, shadow = 5f, texture = 1f, opacity = 1; |
---|
366 | 369 | float fakedepth = 0.5f, shadowbias = 0.01f; // 0.001f; |
---|
| 370 | + |
---|
| 371 | + float parallax = 0; |
---|
367 | 372 | |
---|
368 | 373 | boolean multiply; |
---|
369 | 374 | |
---|