Page 1 of 2 12 LastLast
Results 1 to 10 of 11

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

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jul 2003
    Location
    London
    Posts
    163

    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
    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

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: 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
    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

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2003
    Location
    London
    Posts
    163

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

    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?

    Thank you Jan,
    Luke

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

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

    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.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jul 2003
    Location
    London
    Posts
    163

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

    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

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

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

    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 .

  7. #7
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

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

    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.

  8. #8
    Senior Member Regular Contributor
    Join Date
    Jul 2003
    Location
    London
    Posts
    163

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

    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
    Thanks,
    Luke

  9. #9
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Posts
    340

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

    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).

  10. #10
    Senior Member Regular Contributor
    Join Date
    Jul 2003
    Location
    London
    Posts
    163

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

    Thank you for all the help.

Page 1 of 2 12 LastLast

Similar Threads

  1. Per-pixel shading, but still artifacts
    By AstroBistro in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 03-25-2010, 05:16 AM
  2. Pixel Shading with Fixed T&L?
    By relmas in forum OpenGL: GLSL
    Replies: 1
    Last Post: 03-15-2004, 04:54 AM
  3. Interactive Multi-Pass Programmable Shading
    By bleach in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-17-2000, 02:52 AM
  4. per-pixel shading
    By drumminj in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-29-2000, 06:42 PM
  5. Phong-Shading vs. PerPixel-Lightning vs. Gouraud-Shading
    By DJSnow in forum OpenGL: Advanced Coding
    Replies: 15
    Last Post: 02-15-2000, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean