Re: GL_RG_INTEGER



Nicolas Bonneel a écrit :
Timo Kunze a écrit :
Have a look at specifications of EXT_gpu_shader4. On page 26, there's a
table which combinations are supported. You cannot access integer
textures with a float sampler - at least not with EXT_gpu_shader4.

I tried something similar some months ago: Access a foat rg texture with
integer coordinates. I failed for the same reason.

Timo

isampler2D! :)
thanks! I'll try that!
I hope it's not slower than floating points textures since I wanted to use that to speedup my code (send my int* directly to the card instead of converting them to float* before).

I just had time to try it today. I confirm that it works and it odesn't seem to have lost performance...
I just had to replace my sampler2D by an isampler2D. The texture coordinates remains floats (between 0 and 1 inside the texture).

--
Nicolas Bonneel
http://www-sop.inria.fr/reves/Nicolas.Bonneel/
.


Quantcast