MegaGlest Forum

MegaGlest => MegaGlest => Topic started by: titi on 12 January 2015, 09:28:20

Title: No more trouble with colorpicking?
Post by: titi on 12 January 2015, 09:28:20
I changed something with colorpicking so it uses the depth buffer now.  It looks like this fixed problems with colorpicking in general! Noone had any more false clicks up to now ( 4 big games ) .
Please report if you still have trouble using colorpicking.

Explanation: Using the depth buffer means the units are rendered in the right order. So if there is one unit in front of the another the most front one is selected and its no longer random which unit is selected like before.
Using this I also needed to change the rendering for colorpicking a bit. Now we first render the buildings and then we reset the depth buffer. Then we render the mobile units on top of it. By this you can select "normal" units which hide behind buildings too.

Title: Re: No more trouble with colorpicking?
Post by: Coldfusionstorm on 12 January 2015, 21:05:02
Thank you! This was much needed Thanks Thanks Thanks Thanks Thanks Thanks! Titi,! Seriously THANKS!.
Title: Re: No more trouble with colorpicking?
Post by: titi on 12 January 2015, 21:12:47
So is it fixed for you ?
Title: Re: No more trouble with colorpicking?
Post by: Coldfusionstorm on 12 January 2015, 23:34:47
I have not tested it yet :), but i know of the issue :)
Title: Re: No more trouble with colorpicking?
Post by: titi on 14 January 2015, 00:43:23
Again, anyone has less trouble selecting? Is it better than before or worse? Did it always work for you ?

This is how the color picking view looks like if units are in a tent.
(http://s22.postimg.org/mq5pypfn5/toll.jpg)