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: Redundant shader code

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2010
    Posts
    5

    Redundant shader code

    Is redundant shader code removed at link/assembly time? I'm wondering whether I need to worry about splitting up collections of library code so that only used functions are compiled?

    I'm a shader newb so excuse me if this is a dumb question but I've Googled to no avail

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jul 2010
    Posts
    199

    Re: Redundant shader code

    I don't believe the OpenGL specification dictates how the implementation is done, and if not then it is implementation dependent. But I find it extremely unlikely that GLSL linkers would include functions that aren't referenced.

    I don't think you need to worry about splitting up collections of your library code.

  3. #3
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,261

    Re: Redundant shader code

    You don't need to care about redundant code; your only problem may become compilation times.

Posting Permissions

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