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: Texture 2D

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2012
    Posts
    26

    Texture 2D

    Can someone please tell me how to use the "float bias" in the following syntax,

    texture2D(sampler2D sampler, vec2 coord[,float bias])

    Thank you.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    723

    Re: Texture 2D

    I have never used it but this is from the specs
    In all functions below, the bias parameter is optional for fragment shaders. The bias parameter is not
    accepted in any other shaders. For a fragment shader, if bias is present, it is added to the implicit level of
    detail prior to performing the texture access operation. No bias or lod parameters for rectangular textures,
    multi-sample textures, or texture buffers are supported because mip-maps are not allowed for these types
    of textures.
    The implicit level of detail is selected as follows: For a texture that is not mip-mapped, the texture is used
    directly. If it is mip-mapped and running in a fragment shader, the LOD computed by the implementation
    is used to do the texture lookup. If it is mip-mapped and running on the vertex shader, then the base
    texture is used.

Posting Permissions

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