PDA

View Full Version : Non-vendor-specific OpenGL-Extensions for Fragment and Vertex-Shading on a GF4?


sth
09-19-03, 04:10 PM
I just wanted to know if there is support for non-vendor-specific OpenGL-Extensions for Fragment-Shading (which is what DX calls Pixel Shading) and Vertex-Shading on GeForce 3/4-based cards.

Bert
09-19-03, 04:17 PM
Originally posted by sth
I just wanted to know if there is support for non-vendor-specific OpenGL-Extensions for Fragment-Shading (which is what DX calls Pixel Shading) and Vertex-Shading on GeForce 3/4-based cards.

Vertex Shading: ARB_vertex_program (http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_program.txt)

Pixel Shading: ARB_texture_env_combine (http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt)

Nutty
09-19-03, 04:18 PM
VertexShading, yes. ARB_VertexProgram.

PixelShading, No. Only NV_RegisterCombiners1/2, and NV_TextureShader1/2/3, which are similar, to DX8 pixel shaders.

GF4 does not support dx9 class shaders.

Nutty
09-19-03, 04:20 PM
Pixel Shading: ARB_texture_env_combine

There is that, but I wouldn't call it a fragment shader, its merely an extension of the texture environment functionality.

Bert
09-19-03, 04:20 PM
Originally posted by Bert
Vertex Shading: ARB_vertex_program (http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_program.txt)

Pixel Shading: ARB_texture_env_combine (http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_combine.txt)

With the "combine" extension you can implement per-pixel-lighting etc. What you do not have access to is the more fancy texture addressing operations provided by the texture shaders, like dependent reads.

Nutty
09-19-03, 04:24 PM
With the "combine" extension you can implement per-pixel-lighting etc. What you do not have access to is the more fancy texture addressing operations provided by the texture shaders, like dependent reads.


Hmm.. dont you need dot product capability for per pixel lighting? ARB_texture_env_combine does not give you that, you need ARB_texture_env_dot3, which is an extension to ARB_texture_env_combine.. heh.. extensions to extensions.. gotta love it. :)

Bert
09-19-03, 04:29 PM
Originally posted by Nutty
Hmm.. dont you need dot product capability for per pixel lighting? ARB_texture_env_combine does not give you that, you need ARB_texture_env_dot3, which is an extension to ARB_texture_env_combine.. heh.. extensions to extensions.. gotta love it. :)

Oh yes, you're right, I thought dot3 was included, because it uses the same mechanism. But then, you really need tex_env_crossbar, too ;)

But since all boards out there which support env_combine also support dot3 and crossbar, that's more or less the irrelevant.

Too bad nobody has witten a Cg profile yet supporting combine+dot3+crossbar. Would be really useful, since it is supported by all Radeons, GeForces, even the Intel chips ...

sth
09-19-03, 05:17 PM
Any ARB'ed extensions like for example GL_ARB_fragment_program (which seems to require R3X0/NV3X class hardware)?

Bert
09-19-03, 05:26 PM
Originally posted by sth
Any ARB'ed extensions like for example GL_ARB_fragment_program (which seems to require R3X0/NV3X class hardware)?

I do not quite understand what you are asking now ... All the extensions mentioned above are ARB extensions. What effect are you trying to achieve? If your effects are not more fancy than Doom III then these extensions are sufficient.

But you are right, ARB_fragment_program is only supported by NV3x/R3x0 class. There are "emulation drivers" for the GeForce 3/4, but they only support ARB_fragment_program in software rendering mode (meaning it takes seconds to render a frame).

sth
09-19-03, 06:02 PM
Originally posted by Bert
I do not quite understand what you are asking now ... All the extensions mentioned above are ARB extensions.

Yeah, but ARB_texture_env_combine isn't really what I meant with fragment shading (or pixel shading to speak with DirectX words). I mean fragment shading as in "shader programs/scripts" (whatever you might call it) :cool:

Something like GL_NV_texture_shader but not vendor-specific.

env_combine is more or less only an enhancement to GL's blending modes.

Another Question (slightly related to this thread): Does anyone know if NVidia will support OpenGL 2.0 and what cards will be able to support it? I've seen vendors claiming current ATI cards (9600/9700/9800) will...

Nutty
09-19-03, 07:08 PM
Does anyone know if NVidia will support OpenGL 2.0

Yes.

what cards will be able to support it?

NV4X and R4XX


I've seen vendors claiming current ATI cards (9600/9700/9800) will...

Highly unlikey.

What ppl are probably thinking of is the GLSLANG high level shading language. Which will be part of 1.5 IIRC.

Also, I doubt with R3XX will support that, as the new VertexShader in GLSLANG is meant to provide texture access directly per vertex, which I doubt the R3XX has native support for.

Bert
09-19-03, 07:44 PM
Originally posted by sth
Yeah, but ARB_texture_env_combine isn't really what I meant with fragment shading (or pixel shading to speak with DirectX words). I mean fragment shading as in "shader programs/scripts" (whatever you might call it) :cool:

Something like GL_NV_texture_shader but not vendor-specific.

env_combine is more or less only an enhancement to GL's blending modes.


That's why I was asking what effect you actually want to achieve. You can go quite a long way without specifically programming the texture shaders.

Or is it the language/string-based interface you're after? Your best bet would be to write your own parser with multiple backends to use NVIDIA's or ATI's extensions. I'm not sure if Stanford's Shading Language (http://graphics.stanford.edu/projects/shading/) has an ATI backend by now, you'ld need to check that.

sth
09-20-03, 05:41 AM
Originally posted by Bert
You can go quite a long way without specifically programming the texture shaders.

Yes, that's what I'm currently doing. But I want to take a deeper look into shader stuff in near future (just interested in it). But when I do, I don't want to specialize on a single vendor.

Thanks for the link.

fortress
09-20-03, 11:11 AM
the only cards i cann think of that are supposed to support opengl 2.0 right now are 3dlabs


i am sure ati and nv will in the future but i think 3d labs does now not 100%
dont have one but worth taking a look at

Bert
09-20-03, 11:25 AM
Originally posted by fortress
the only cards i cann think of that are supposed to support opengl 2.0 right now are 3dlabs


No card currently supports OpenGl 2.0. That standard does not yet even exist ;)

If you are talking about GLslang, yes, I think that is in the 3Dlabs WildCat VP drivers, as a normal GL extension. I suspect ATI will be next, as they were actively working in the ARB group. Would be a nice surprise if NVIDIA beat them, but I guess those guys have different worries right now.

Nutty
09-20-03, 12:40 PM
Dont think NV is sitting quiet on the API front. The det 50.XX that were leaked contain some hidden extensions strings.

NV_fragment_program2
NV_vertex_program3
NV_program_registers

Vendor specific yes, given there wont be any new ARB extensions for a while. (Not counting GLSLANG)

NV_fragment_program2. Probably same as the last one but supporting the new FX16 format Uttar says NV40 is gonna have..

NV_vertex_program3. Probably similar to ARB_VertexShader (The GLSLANG version) which allows texture access in the vertex shader.

NV_program_registers. Absolutely no idea at all... :D