philazzi44 / DnDCS

DnD Client-Server
3 stars 1 forks source link

Fog effect reveals more than highlighted #2

Open philazzi44 opened 10 years ago

philazzi44 commented 10 years ago

The alpha fog effect rendering ends up adding the effect outwards to the area that was selected. I can see this being bad for the DM who would only want to reveal a certain block and carefully highlights to exclude a 'secret passage' that might only have a thin wall. The fog effect will end up partly revealing the area beyond the selection, so the players will see more than they should.

If we tweaked the effect to instead apply the incremental alpha inwards, rather than outwards, we'll end up with a dimly lit interior wall rather than seeing over the wall.

philazzi44 commented 10 years ago

Updated to support inwards fog effect - it's kind of buggy when revealing odd shapes, because it falls over if the entire width of the shape ends up being 100% alpha. Still needs more work to properly handle that situation - for the time being, a shape that is too small will just be revealed 100% but for complex shapes (e.g. a banana shape, for example) just doesn't end up revealing properly because the "offset points" (offset polygon it creates) ends up too small or something.