Re: [osg-users] Image containing floats

2018-09-24 Thread ivar out
Thanks David! I got it to work now. Here my function creating a 2D texture from a 2-Dimensional vector, in case it's of any use to anyone. Code: osg::Texture2D* createTextureLUT2D(std::vector >& data) { int rows = data.size(); int cols = data[0].size();

Re: [osg-users] Image containing floats

2018-09-20 Thread David Heitbrink
yes this is doable. You need to set the internal format to something like: GL_RGBA32F and the source type to float on your texture. You might look at the OSG forest example, and its use of osg::TextureBuffer. Basically with the forest example, its doing instancing where the transforms are

Re: [osg-users] Image containing floats

2018-09-20 Thread ivar out
Hi, I'm trying to generate my own lookup table containing floats and store it in an image, and apply it to a texture to send it to the shader. I am having issues with getting the image to store floats though. Is there any way to do so, or am I trying something impossible? cheers, Ivar