Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7654121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:11:55+00:00 2026-05-31T12:11:55+00:00

In a fragment shader, the following compiles fine: uniform isampler2D testTexture; /* in main()

  • 0

In a fragment shader, the following compiles fine:

uniform isampler2D testTexture;
/* in main() x, y, xoff and yoff are declared as int and assigned here, then... */
int tmp = texelFetchOffset(testTexture, ivec2(x, y), 0, ivec2(xoff, yoff)).r;

However, the following does not compile:

uniform usampler2D testTexture;
/* in main() x, y, xoff and yoff are declared as uint and assigned here, then... */
uint tmp = texelFetchOffset(testTexture, uvec2(x, y), 0, uvec2(xoff, yoff)).r;

The OpenGL 4.2 driver gives the following compiler error message:

error C1115: unable to find compatible overloaded function “texelFetchOffset(usampler2D, uvec2, int, uvec2)

This is Nvidia’s Linux driver 290.* for a Quadro 5010M — but I’m wondering if I made a (beginner) mistake and was not working to spec somehow here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:11:56+00:00Added an answer on May 31, 2026 at 12:11 pm

    The texelFetchOffset function that takes a usampler2D still takes an ivec2 as its texture coordinates and offset. The u only applies to the sampler type and return value; not everything about the function becomes unsigned.

    And remember: OpenGL doesn’t allow implicit conversions between unsigned and signed integer types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fragment shader with the following attributes: varying highp vec2 coordinate; precision
I have the following vertex shader: uniform mat4 uMVP; attribute vec4 aPosition; attribute vec4
I have the following code in the Fragment Shader: precision lowp float; varying vec2
I have an GLSL geometry shader that looks like the following: #version 150 uniform
I have the following vertex shader : uniform mediump mat4 projMx; attribute vec2 a_position;
I’m trying to pass an array of ints to the fragment shader via uniform
Should a WebGL fragment shader output gl_FragColor RGB values which are linear, or to
I'm doing ray casting in the fragment shader. I can think of a couple
I have two textures generated using a fragment shader. I want to be able
If we are going to generate fog using the vertex shader and the fragment

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.