Per Pixel Lightning
Hi,
I've written an PPL demo but the problem is that I've used the "GL_NV_vertex_program" extension and thos one isn't supported with the ordes 3D card.
So, I'd like to update the code for using ARB_vertex_program instead of the old one. How can I do that ?
Does anybody can help me ?
Here's the demo and the source code :
http://users.skynet.be/fa550206/Slug-Production/Download/Zip/Per-Pixel-Lightning.zip
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/
[edited by - Leyder Dylan on September 23, 2003 4:53:14 PM]
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Just by looking at the topic title, I knew who was the author of this thread. 
It's per-pixel lighting, not lightNing ! Il faut faire un effort depuis le temps

Whatsoever, yes you can port NV_vp to ARB_vp pretty easily for what I've seen so far. With regard to the syntax (which is the first visible difference), just take a look at the examples in the ARB_vp specification you will easily notice the syntax difference.
Just to make short (and not exhaustive) the two major differences are, IMHO :
* ARB_vp is much easier to use variables as you can give the name you want. No more 'o[POS]' and things like that, you use 'output.position' or you can alias the output to oPos using 'OUTPUT oPos = output.position'. But take a look at the examples it's very clear.
* The second big change is that you don't have to track matrices using glTrackMatrixNV. Instead, you declare variables in the vertex program, like that :
PARAM mvp[4] = { state.matrix.mvp };
Again, take a look at the examples they are very clear.
WRT examples, I've submitted an enhancement of the NeHe cel-shading tutorial with ARB_vertex_program support. You can download it at NeHe Productions in the downloads section under te letter 'C'. The program is pretty simple so it should be easy to follow. Moreover there is a complete line-by-line walkthrough. hth
For other differences, take a look at the ARB_vp specification (at The OpenGL Extensions Registry) which enumerates changes to NV_vp and EXT_vs (EXT_vertex_shader used to be ATi's OpenGL implementation of vertex shading, but now they seem to rely much more on ARB_vp).
[edited by - vincoof on September 23, 2003 6:35:26 PM]
[edited by - vincoof on September 23, 2003 6:40:49 PM]

It's per-pixel lighting, not lightNing ! Il faut faire un effort depuis le temps


Whatsoever, yes you can port NV_vp to ARB_vp pretty easily for what I've seen so far. With regard to the syntax (which is the first visible difference), just take a look at the examples in the ARB_vp specification you will easily notice the syntax difference.
Just to make short (and not exhaustive) the two major differences are, IMHO :
* ARB_vp is much easier to use variables as you can give the name you want. No more 'o[POS]' and things like that, you use 'output.position' or you can alias the output to oPos using 'OUTPUT oPos = output.position'. But take a look at the examples it's very clear.
* The second big change is that you don't have to track matrices using glTrackMatrixNV. Instead, you declare variables in the vertex program, like that :
PARAM mvp[4] = { state.matrix.mvp };
Again, take a look at the examples they are very clear.
WRT examples, I've submitted an enhancement of the NeHe cel-shading tutorial with ARB_vertex_program support. You can download it at NeHe Productions in the downloads section under te letter 'C'. The program is pretty simple so it should be easy to follow. Moreover there is a complete line-by-line walkthrough. hth
For other differences, take a look at the ARB_vp specification (at The OpenGL Extensions Registry) which enumerates changes to NV_vp and EXT_vs (EXT_vertex_shader used to be ATi's OpenGL implementation of vertex shading, but now they seem to rely much more on ARB_vp).
[edited by - vincoof on September 23, 2003 6:35:26 PM]
[edited by - vincoof on September 23, 2003 6:40:49 PM]
T''as raison, je n''ai jamais fait le changement. Je suis un gros fainéant ...
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/
========================
Leyder Dylan (dylan.leyder@slug-production.be.tf
http://www.slug-production.be.tf/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement