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 8164699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:22:32+00:00 2026-06-06T19:22:32+00:00

I’m working on implementing a single pass depth-peeling algorithm by using atomic textures in

  • 0

I’m working on implementing a single pass depth-peeling algorithm by using atomic textures in OpenGL 4.2. I wrote the following fragment program:

#version 420 core
layout(r32i) coherent uniform iimage2D img2D_0;
uniform iimage2D img2D_1;
in vec3 pos;
vec4 insert(vec4 data, float new_data) {
    if      (new_data<data.x) return vec4(      new_data,data.xyz);
    else if (new_data<data.y) return vec4(data.x,new_data,data.yz);
    else if (new_data<data.z) return vec4(data.xy,new_data,data.z);
    else if (new_data<data.w) return vec4(data.xyz,new_data      );
    else                      return data;
}
void main() {
    ivec2 coord = ivec2(gl_FragCoord.xy);
    while (imageAtomicCompSwap(img2D_0,coord,0,1)==1);
    vec4 depths = imageLoad(img2D_1,coord);
    depths = insert(depths,gl_FragCoord.z);
    imageStore(img2D_1,coord,depths);
    memoryBarrier();
    imageAtomicExchange(img2D_0,coord,0);
}

However, I get the following errors:

Fragment info
-------------
0(15) : error C1115: unable to find compatible overloaded function "imageLoad(struct iimage2D, ivec2)"
0(17) : error C1115: unable to find compatible overloaded function "imageStore(struct iimage2D, ivec2, vec4)

I note that I am using #version 420 in the shader, and I checked the functions’ declarations in the documentation (imageLoad, imageStore) and they seem to match. Curiously, imageAtomicCompSwap, memoryBarrier, and imageAtomicExchange seem to be defined. Why could these errors occur?

  • 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-06-06T19:22:33+00:00Added an answer on June 6, 2026 at 7:22 pm
    uniform iimage2D img2D_1;
    

    This is not a valid image definition. You must use layout() to define its image format, unless you have declared it writeonly. It should have errored out on this line, but it interpreted it as some kind of struct definition. So it errored out later when you tried to use it.

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.