Im having trouble with memory barrier. GLSL texture() function always samples 0 index of my 1D texture.
Here is geometry shader code
#version 430
...................
layout(rgba32f, binding = 0) uniform image1D Texture;
void main() {
imageStore(Texture, 0, vec4(0.0, 0.0, 0.0, 0.0));
imageStore(Texture, 5, vec4(255.0, 0.0, 0.0, 0.0));
}
Here is rendering pipeline
model.DrawOnTexture(); // stores pixels in image1D
glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT);
model.Draw(); // samples 1D texture in which i wrote previously
But this still doesnt work. model.Draw() function always samples 0 index of my texture, while i provide the 5th. What should i do?