[osg-users] Passing location-based data to a fragment shader

2013-06-18 Thread Shahar Kosti
Hi all, I'm trying to combine two data sources in a shader: * "Terrain" model - a large object in OSG or TXP formats. * Metadata grid - a data structure that provides additional information for 2D coordinates in the terrain (at a certain resolution). I'd like to use some of the additional meta

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-18 Thread Sebastian Messerschmidt
Hi Shahar, If the data is 2D and simply projected to x,y you could use a 2D texture and sample it per fragment based on generated texture coordinates Hi all, I'm trying to combine two data sources in a shader: * "Terrain" model - a large object in OSG or TXP formats. * Metadata grid - a

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-18 Thread Shahar Kosti
Hi Sebastian, Thanks for your response. What if the data does not fit in a single 2D texture? in the worst case scenario, the terrain format would be TXP (i.e. paged) and the additional data resolution would be close to the textures resolution. Is there any way to have a set of hidden textures,

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-18 Thread Sebastian Messerschmidt
Hi Shahar Kosti: Hi Sebastian, Thanks for your response. What if the data does not fit in a single 2D texture? in the worst case scenario, the terrain format would be TXP (i.e. paged) and the additional data resolution would be close to the textures resolution. Is there any way to have a set o

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-23 Thread Shahar Kosti
Sebastian Messerschmidt wrote: > Hi Shahar Kosti: > As you don't provide any exact numbers I can only guess. But usually I'd > bind one or more textures per tile of paged set. > Depending on your hardware bind of 8192x8192 textures is no problem. > Can you be a bit more specific on how big the se

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-25 Thread Sebastian Messerschmidt
Hi Shahar, answers below. Sebastian Messerschmidt wrote: Hi Shahar Kosti: As you don't provide any exact numbers I can only guess. But usually I'd bind one or more textures per tile of paged set. Depending on your hardware bind of 8192x8192 textures is no problem. Can you be a bit more specific

Re: [osg-users] Passing location-based data to a fragment shader

2013-06-26 Thread Trajce Nikolov NICK
Hi Shahar, I read this post and found it interesting. Just out of curiosity : Each texel in the new texture, should be set based on the world location of the corresponding texel in the current geometry texture Are you trying to overlay a texture on top of txp archive and it should be georeferenc

Re: [osg-users] Passing location-based data to a fragment shader

2013-07-01 Thread Shahar Kosti
Hi Sebastian, Thanks for the detailed explanation and the hints regarding texture/world coordinates. I've tried binding at the tile level as you suggested, but apparently the additional data source is not fast enough to be used at real-time. At this point, I'm going to have the original terrain

Re: [osg-users] Passing location-based data to a fragment shader

2013-07-01 Thread Shahar Kosti
Hi Nick, Yes, this is part of what I'm trying to do (I'd like to do the same with osg models). I'd be glad if you could elaborate on the different approach, even though I would probably go with pre-generating the texture along with the archive. Thanks, Shahar Trajce Nikolov NICK wrote: > Hi