PDA

View Full Version : GLSL vertex shader code to do glTexGen() equivalent?



Jon Mc Jon
11-08-2006, 07:29 PM
Ok, read over the entries here and done some searching on the web, have not got anywhere.

Can somebody please point me to some GLSL vertex shader code to do the equivalent of glTexGen() ?

Ie. generate texture coordinates automatically.

Best Regs
Jon
:confused:

Jon Mc Jon
11-08-2006, 07:30 PM
I should expand on that, I only just learned that that functionality is replaced by GLSL.
I have deactivated my vertex shader experimentally and glTexGen works nicely with my fragment shader, but I can just feel it - I am going to need vertex shader functionality down the track. :)

Jon

MalcolmB
11-08-2006, 07:50 PM
http://developer.3dlabs.com/downloads/shadergen/

This is what you want. It will give you GLSL shader code for any of the fixed pipeline functionality.

Enjoy!

Jon Mc Jon
11-08-2006, 09:03 PM
Hey thanks, nice looking app!
Its win32 though, I'm developing on Linux though I could try and see if it will run in vmware without spitting the dummy. :)

MalcolmB
11-08-2006, 09:56 PM
Well the source code is given also so you can look through that to get the shader code you want (Assuming you cant get it running any other way).

Jon Mc Jon
11-08-2006, 10:12 PM
Great, thanks!

Jon Mc Jon
11-09-2006, 09:19 PM
Are there any fixed-functionality-replacement GLSL shader sites online, by any chance? I can't find any via websearching.

Also - what of the "Orange Book", is it chock full of them?

Jon