.. | .. |
---|
140 | 140 | projectedVertices[i] = new cVector2(); // Others |
---|
141 | 141 | } |
---|
142 | 142 | projectedVertices[0].x = 100; // bump |
---|
143 | | - projectedVertices[1].y = 5000; // punchthrough. only for png |
---|
| 143 | + projectedVertices[1].y = 1000; // punchthrough. only for png |
---|
144 | 144 | } |
---|
145 | 145 | |
---|
146 | 146 | void MinMax(cVector minima, cVector maxima) |
---|
.. | .. |
---|
641 | 641 | boolean random = false; |
---|
642 | 642 | boolean speedup = false; |
---|
643 | 643 | boolean rewind = false; |
---|
| 644 | + |
---|
| 645 | + // Option to sort triangles, e.g. for transparency. |
---|
| 646 | + boolean sort = false; |
---|
644 | 647 | |
---|
645 | 648 | float NORMALPUSH = 0; |
---|
646 | 649 | |
---|
.. | .. |
---|
1213 | 1216 | { |
---|
1214 | 1217 | // return true; |
---|
1215 | 1218 | |
---|
1216 | | - if (material == null || material.multiply) |
---|
1217 | | - return true; |
---|
| 1219 | +// if (material == null || material.multiply) |
---|
| 1220 | +// return true; |
---|
| 1221 | +// |
---|
| 1222 | +// if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1223 | +// return false; |
---|
| 1224 | +// |
---|
| 1225 | +// // Transparent objects are dynamic because we have to sort the triangles. |
---|
| 1226 | +// return material.opacity > 0.99; |
---|
1218 | 1227 | |
---|
1219 | | - if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
1220 | | - return false; |
---|
1221 | | - |
---|
1222 | | - // Transparent objects are dynamic because we have to sort the triangles. |
---|
1223 | | - return material.opacity > 0.99; |
---|
| 1228 | + return !sort; |
---|
1224 | 1229 | } |
---|
1225 | 1230 | |
---|
1226 | 1231 | boolean IsOpaque() |
---|
1227 | 1232 | { |
---|
1228 | 1233 | // return true; |
---|
1229 | 1234 | |
---|
1230 | | - if (material == null || material.multiply) |
---|
1231 | | - return true; |
---|
| 1235 | +// if (material == null || material.multiply) |
---|
| 1236 | +// return true; |
---|
| 1237 | +// |
---|
| 1238 | +// return material.opacity > 0.99; |
---|
1232 | 1239 | |
---|
1233 | | - return material.opacity > 0.99; |
---|
| 1240 | + return !sort; |
---|
1234 | 1241 | } |
---|
1235 | 1242 | |
---|
1236 | 1243 | Object3D() |
---|
.. | .. |
---|
6307 | 6314 | Globals.lighttouched = true; // all panes... |
---|
6308 | 6315 | } |
---|
6309 | 6316 | |
---|
6310 | | - touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false; |
---|
6311 | | - //touched = false; |
---|
| 6317 | + //touched = GetBRep() == null; // this instanceof Composite || this instanceof FileObject; // false; |
---|
| 6318 | + touched = false; |
---|
6312 | 6319 | |
---|
6313 | 6320 | if (this instanceof Texture || this instanceof TextureNode) |
---|
6314 | 6321 | { |
---|
.. | .. |
---|
6455 | 6462 | boolean failedPigment = false; |
---|
6456 | 6463 | boolean failedBump = false; |
---|
6457 | 6464 | |
---|
| 6465 | + CameraPane.lastObject = this; |
---|
6458 | 6466 | try |
---|
6459 | 6467 | { |
---|
6460 | 6468 | display.BindPigmentTexture(tex, texres); |
---|