Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: getting texture dimensions from inside a shader

  1. #1
    Intern Contributor
    Join Date
    Oct 2012

    getting texture dimensions from inside a shader


    I would like to get texture's width height and depth from within the shader. Is that possible? I read some previous posts on how there is no way to do this except sending the dimension values as uniform variables into the shader. Is this still the case?

    I have code where the texture is bound to a texture unit in a different location and then the shader's sampler is attached to the texture unit (all the shader binding etc in a different location). I would like to keep all things together instead of decoupling properties of a texture in different variables, samplers etc in different locations and then loosing track of these and messing up.


  2. #2

Tags for this Thread

Posting Permissions

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