Jump to content
  • Advertisement
Sign in to follow this  
kRogue

OpenGL how slow is texture look up in vertex shader?

This topic is 4403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I was just wondering if anyone has taken a look at how slow a texture lookup might be in the vertex shader... admittedly only GeForce 6,7, or 8 do it (I don't know which ATI cards do it though)... the reason why I was considering doing a texture look up is kind of funny: but here goes: I have code that generates meshes, and I was wondering if I would be better off coding the position data into a texture rather than VBO's.. at first this idea came for wanting to do the position lookup in the fragment shader: right now I have an adaptive mesh generator (i.e. if things are too curvy, refine the mesh) and I generate a bump map, but if a triangle does not get teselated enough, then the results look funny on that triangle when lighting is applied... so I thought I'd do the position look up in the fragment shader for lighting calculations only.. but then since I was going to generate the position texture anyways, I thought well, why don't I jsut feed in the drid points into the vertex shader anyways rather than having to bind and unbind the geomertic data VBO's (not to mention that it is kind of like having the same data in 2 different forms). also, since the newer hardware is supposed to have unified shaders (i.e. nVidia Geforce 8 and the next card from ATI) does that imply that exture look up in vertex shader should be jsut as fast? anyone here got a chance to play with a Gefore8 and nVidia's openGL extensions for geometry shaders? it is actually kind of funny that thanks to openGL extensions, one can do GS in XP/2000 (and Linux for that matter) and not have to use DX10 in Vista only... I wonder if MS would backport DX10 if too many games say "we'll use GS via openGL" that would be kind of ironic.

Share this post


Link to post
Share on other sites
Advertisement
Current ATi cards do not support Vertex Texture Lookup (VTF). The NVIDIA 6 and 7 series have very limited support for VTF, you can only use one texture format (must be floating point GL_RGBA_FLOAT32_ATI), no filtering (GL_NEAREST) and it is pretty slow. The Geforce 8 series should have greatly improved speed for VTF (I know there was a benchmark comparing the implementations but I can't find it) without the limitations and the R600 will support it as well.

Share this post


Link to post
Share on other sites
Quote:
Original post by nts
Current ATi cards do not support Vertex Texture Lookup (VTF). The NVIDIA 6 and 7 series have very limited support for VTF, you can only use one texture format (must be floating point GL_RGBA_FLOAT32_ATI), no filtering (GL_NEAREST) and it is pretty slow. The Geforce 8 series should have greatly improved speed for VTF (I know there was a benchmark comparing the implementations but I can't find it) without the limitations and the R600 will support it as well.


No no not quite 100% correct.

You have access to GL_RGBA_FLOAT32_ATI and GL_LUMINANCE_FLOAT32_ATI both floating point ATI extensions and you can use mipmapping but you will need to use nearest as stated.

ftp://download.nvidia.com/developer/Papers/2004/Vertex_Textures/Vertex_Textures.pdf

BTW speed wise will be SLOW like 1FPS if you hit the software path and don't stay on the fast path(aka hardware) so use only those two types for textures.

[Edited by - MARS_999 on November 19, 2006 9:51:18 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!