here's the code then
anyhow, not an opengl expert, just googled how to do it;
basically setting a different color (mostly different alpha) for each vertex;
i've also set shading to be SMOOTH, that's about it
LOS Request
Moderator: Moderators
Re: LOS Request
- Attachments
-
- tp_FogOfWar.lua
- (4.71 KiB) Downloaded 110 times
Re: LOS Request
anyhow, the edges still feel somehow rough, no surprise seeing as rectangles break edges at 90 degree angles, hexagons do it at 60 so it should be somewhat smoother;
i've just no intention on doing that, i hate geometry as it is :p
i've just no intention on doing that, i hate geometry as it is :p
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: LOS Request
Seems to have some issues O_o


Re: LOS Request
yeh, I did a change that i knew would cause a problem with some edges.
Still, even the original is improperly rendering it (although less visible due to all the random changes that were happening offmap - maybe they were intentional so it would hide it? :)
notice the top right corner:

anyway the new upload fixes the missing line (not the above mentioned problem though), i've also removed the randomly generated areas - they're slightly annoying, you can always revert it if you want to, it's only one assignment
Still, even the original is improperly rendering it (although less visible due to all the random changes that were happening offmap - maybe they were intentional so it would hide it? :)
notice the top right corner:

anyway the new upload fixes the missing line (not the above mentioned problem though), i've also removed the randomly generated areas - they're slightly annoying, you can always revert it if you want to, it's only one assignment
- Attachments
-
- dbg_tp_FogOfWar.lua
- (4.71 KiB) Downloaded 116 times
Re: LOS Request
ah cool.gajop wrote:basically setting a different color (mostly different alpha) for each vertex;
i've also set shading to be SMOOTH, that's about it

my idea would have been to use textures on the rectangles and the textures would have some gradients, shapes etc.
The last line is sometimes missing because grid size is no multiple of map size. (put local res = 64 and it should always fit)
Re: LOS Request
So would changing engine code be the only way to allow this widget to cover everywhere properly instead of having fugly bits showing through?
Re: LOS Request
well, i do not really know a good way how it would work.
but it is not so important now anyway because next spring will have shadows in LOS view and Beherith is making his shader thing etc.
http://springrts.com/phpbb/viewtopic.php?f=12&t=28375
(my ati never draws shadows so no idea if it works)
but it is not so important now anyway because next spring will have shadows in LOS view and Beherith is making his shader thing etc.
http://springrts.com/phpbb/viewtopic.php?f=12&t=28375
(my ati never draws shadows so no idea if it works)
Re: LOS Request
thats why ati is not supported, they draw no shadows, thus see everything, thus cheat viat there non-suportedness, thats why ati is not soup ported