Is progr. pixel shading same as hlsl and same as programmable fragment shading?

Is programmable pixel shading, the same as programmable fragment shading and the same as hlsl?
Getting a bit confused :frowning:
How does the OpenGL programmable pixel shading compare with the one in DirectX?
Is there a hlsl (high level shading language) extension for OpenGl? Is there one fr Direct X?
Thank you,
Luke

Is programmable pixel shading, the same as programmable fragment shading and the same as hlsl?
Getting a bit confused :frowning:
How does the OpenGL programmable pixel shading compare with the one in DirectX?
Is there a hlsl (high level shading language) extension for OpenGl? Is there one fr Direct X?
Thank you,
Luke

“pixel” and “fragment” is the same, a pixel shader mentioned in a game magazine is the same as a fragment program.

and these are hardware capabilities, while hlsl is a language to program these.

and concerning the comparions of ogl vs d3d at these aspects, fragment shaders (g) are HARWDARE abilities, while ogl and d3d simply give you the utilities to access these capabilities.

and I am quite sure that both of them support everything the hardware has to offer, so they are about the same in terms of fragment shading capabilities.

Jan

OK, then if Opengl already has fragment shaders (programmable pixel shaders) then why is this talk with high-level shading language (Opengl hlsl) making it to v2.0? Isn’t hlsl the same as a way of programming hardware ability to do pixel shading?
:frowning:
Thank you Jan,
Luke

the reason is: continously making things better. there are extensions for fragment programs, but with these you have to program the gpu in assembler, what most people don’t like. a high level shading language is a high level language (as the name suggests), that gets compiled to gpu assembler.

Jan, does the DirectX have high level shading language?
hmmm… but there already is a high level shading language for OpenGL, provided by NVidia, such as cG, right?
But I guess that only works with Nvidia cards (only FX line?)
Thank you again Jan,
Luke

well I am not an expert in these things, I guess other people know a lot more than me .

especially I don’t know very much about directx.

But I guess that cg is only for nvidia, glslang was developed by 3d labs and there is/was some concurrency between them. glslang will only run properly with radeon 9500/ gf fx due to the pixel shader specification. I think the gf4 also has pixel shaders, but ones that do not meet these specifications (althoug I might be wrong). I think those would run with cg, however.

Well. try .

Originally posted by JanHH:
“pixel” and “fragment” is the same
Not exactly. A pixel is a color element of the framebuffer. A fragment is more than this : it has color, depth, tex coords… Several fragments can be used to create a pixel.

Originally posted by JanHH:
fragment shaders (g) are HARWDARE abilities
No. Fragment shaders are custom instruction sequences performed at the fragment level. Whether they are executed in hardware or emulated on the CPU does not change their nature.

Originally posted by BigShooter:
Jan, does the DirectX have high level shading language?

Yes, it’s called HLSL, and is available since D3D 9.

hmmm… but there already is a high level shading language for OpenGL, provided by NVidia, such as cG, right?
But I guess that only works with Nvidia cards (only FX line?)

Cg is API-independent. Shaders written in Cg can then be translated into API-specific code. For the moment, the Cg compiler supports D3D’s HLSL, OpenGL’s ARB_fragment_program, and NVIDIA-specific NV30 (FX family) OpenGL extensions.

why is this talk with high-level shading language (Opengl hlsl) making it to v2.0?
The argument is about making the OpenGL Shading Language (glslang) a part of the core or not. Some believe that OpenGL should only define assembly-like language, and higher-level languages should be defined on top of it (like Cg today). Other prefer to have a built-in high level language shipped with OpenGL. For now, glslang stays outside of the core and is defined as an extension.

Kehziah, how does cG compare to glshade?
Whatabout cg or glshade to HLSL of DirectX ?
After I understand OpenGL, I’d love to play around with some shaders :slight_smile:
Thanks,
Luke

Cg is API-independent. HLSL and glslang are API-specific. (btw, I made a mistake in my previous post : Cg can be compiled into DX pixel shaders (assembly-like language), not HLSL). Apart from that, they are very similar. Once you are comfortable with one of them, you can switch to another easily. It’s really more the concepts behind programmability that are interesting rather than the language in which you express them (apart from the low vs high language debate, which is pointless IMHO).

Thank you for all the help.

of course, fragment shaders can be implemented in software, but you will not want to use them in this case. what i meant was that useable pixel shaders are there because the hardware supports them, not because the api wants them to be there.