View Full Version : TexGen or VertexProgram?
06-05-2002, 03:18 PM
Which is typically faster using texgen or a vertex program. Specifically for the texture generation required for shadow buffers. The reason I am wondering is that in D3D there seems to be no texgen and only vertex shaders. While in openGL you have the option. Thanks.
06-05-2002, 10:47 PM
The short answer: You really don't know without trying both and measuring the performance. There isn't a hard and fast rule, and the results may be different depending on which card you use.
With that in mind though, TexGen is certainly an easier solution. Plus, it''ll work on every card out there, whereas with vertex programs you're limited to ATI / NVIDIA, and you'll have to write a different program for each. So I'd say go with TexGen unless there's a *really* good reason not to. But that's just my opinion, and I'm sure others will disagree... http://www.opengl.org/discussion_boards/ubb/smile.gif
06-06-2002, 04:01 AM
A minor digresion.
Was cdoign with use od d3d8 a long time ago ( in a diffren galaxie - when was using win32 ... now linux http://www.opengl.org/discussion_boards/ubb/smile.gif - it doesn't have anything like texgen...but texgen works like if you were specyfing the texture matrix.
So you can do that in d3d8 without sue of vertex shaders as they are called in d3d...you have to setup the texture matrix instead.
But nevertheless.....OGL rocks and ogl 2.0 will kick butt even more http://www.opengl.org/discussion_boards/ubb/wink.gif
06-06-2002, 05:34 AM
True, but there is one major advantage of using texgen over using the texture matrix. For using just the texture matrix you still need to supply the vertex coords (even though they are the same as the vertex position values). For texgen, the base texture coords are taken from the vertex coords automatically. This means when you supply a vertex, it takes less bytes and thus has a better chance of fitting in a cache line.
[This message has been edited by LordKronos (edited 06-06-2002).]
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.