Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Multitexturing/Fragment program and fragment operations

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2004
    Location
    Milan
    Posts
    3

    Multitexturing/Fragment program and fragment operations

    I wonder where is the fragment program against all standard fragment operations (scissor test, depth test,alpha test,blending etc)

    Before or after all of this test?

    Thanks to everyone

    Davide

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Multitexturing/Fragment program and fragment operations

    Theoretically everything you have listed is after shaders, but implementations do things out of order as optimizations for example early z and obvioulsy scissor. You can't see any visual difference, but the optimizations can be much faster.

    The order of scissor is a no brainer, before or after shaders, the visual results are always identical but one is faster (for obvious reasons implementations won't even generate interpolated fragments never mind reach the shader for scissor), however optimizations like the early z (and/or coarse z) test requires that you use the unmodified fragment depth value, otherwise the hardware will perform it later.

    Visually behavior remains as if shaders are performed before all the listed framebuffer ops.

    The features you have listed are generally referred to as framebuffer operations, the fragment operations that fragment shaders replace are things like texture environments etc.

    In addition fragment shaders support instructions like KILL that might initiate an early fragment cull although the actual performance effect is as usual implementation dependent.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2004
    Location
    Milan
    Posts
    3

    Re: Multitexturing/Fragment program and fragment operations

    thanks dorbie for your help,
    I saw a diagram on gamedev.net that explains this pipeline and the shader ar before this fragment function.
    It is a directx diagram, but I think that this is very similar.

    Davide

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •