Results 1 to 4 of 4

Thread: what is need of integer and SNORM textures

  1. #1
    Senior Member Regular Contributor
    Join Date
    Apr 2012
    Posts
    318

    what is need of integer and SNORM textures

    What is the advantage or need of integer and SNORM textures? when do we use (-1,0) range for textures? Any example where we need specifically integer or SNORM textures?

  2. #2
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789
    SNORM textures don't go {-1, 0}, they go {-1, 1}: https://www.opengl.org/registry/spec...ture_snorm.txt

    This extension provides a set of new "signed normalized" integer texture formats. These are taken to represent a floating-point value in the range [-1.0,1.0] with an exact 0.0.
    You'd use this for e.g storing normals in a g-buffer (the guaranteed exact 0 is useful here).

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2012
    Posts
    318
    and what about integer textures? when do we need those specifically?

  4. #4
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789
    One example that goes way back is a D24S8 depth texture stores depth as an integer. That aside, it's just functionality; you may as well ask "why do we need an integer data type in C?" and the answer will be the same - for times when you need to use an integer. So if you're implementing an algorithm and that algorithm needs an integer at some point then you may wish to use an integer texture. But it all depends on the algorithm you're implementing.

Similar Threads

  1. integer textures
    By john_connor in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-07-2019, 07:08 AM
  2. How to get integer textures?
    By sc20184 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 07-24-2017, 07:00 AM
  3. Sampler variable for SNORM textures
    By debinair in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-25-2012, 11:28 AM
  4. Integer textures and integer samplers
    By Beren Minor in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-23-2011, 12:52 AM
  5. Integer lookup textures
    By Took My Job in forum OpenGL: GLSL
    Replies: 3
    Last Post: 04-13-2010, 03:07 PM

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