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

Thread: specifying samplers in shader

Hybrid View

  1. #1
    Junior Member Regular Contributor peterfilm's Avatar
    Join Date
    Sep 2009
    Location
    UK
    Posts
    124

    specifying samplers in shader

    could someone remind me again why we can't set the integer value of a sampler directly in the shader, in the same way we can specify the generic vertex attribute slot of an input, and the uniform buffer binding index?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Because you didn't read far enough in the ARB_shading_language_420pack extension? You know, the part where it says that this is legal:

    Code :
    layout(binding = 0) uniform sampler2D myTextureUsesUnit0;

    I don't know how you missed that, since it is literally right after the part where it says you can do this same thing with uniform blocks...

    Either that, or you're running into a driver bug.

Posting Permissions

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