2) Repeat 1) choosing building by next height lower, unless lower building roof within range of an existing rendered roof x+width, then exclude that building from rendering.
3) Once all buildings roofs drawn, draw the building side verticals downwards from each until they hit a roof or ground (either from a cache or detecting pixel colour), in which case stop.
> 2) Repeat 1) choosing building by next height lower, unless lower building roof within range of an existing rendered roof x+width, then exclude that building from rendering.
5 comments
[ 6.4 ms ] story [ 22.1 ms ] thread1) Choose highest building. Draw it's roof horizontal only.
2) Repeat 1) choosing building by next height lower, unless lower building roof within range of an existing rendered roof x+width, then exclude that building from rendering.
3) Once all buildings roofs drawn, draw the building side verticals downwards from each until they hit a roof or ground (either from a cache or detecting pixel colour), in which case stop.
How do you implement the unless-part?