Multi-highlithed features shader

classic Classic list List threaded Threaded
3 messages Options
Nicholas Nicholas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multi-highlithed features shader

Hello all,

I started from the sample "osgearth_pick.cpp" to highlight features in our code.
It works well on one feature, but now I'd like to do it for multiple items.

My problem is on the shader highlight program. For performance reason, I can't reasonably have an unsigned int array uniform that had all the selected ObjectID.

Do you have any idea on a way to do this ?

Regards,
Nicholas.
For crying out loud !
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multi-highlithed features shader

Nicolas,
What's the performance issue? If it's the array uniform, perhaps try using a sample buffer instead.
Glenn Waldron / Pelican Mapping
Nicholas Nicholas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multi-highlithed features shader

The main problems is that we have alot of features (thousands of buildings), so I had to defined a really big array of objectID to highlight.

I think the main problem is the "if" statement that I have to do on every array's elements. If I remember correctly, it's an heavy load on a shader.

I'll try a sample buffer instead, see if it could speed up thinks.

Regards,
Nicolas.
For crying out loud !
Loading...