Hey to all. Here is my problem - im writing to SSBO, everything is OK, even when i fetching data directly, but when i try to compare value from SSBO with another value - it fails.
Here is my pipeline -
First shader (Writing to SSBO) :
layout(std430, binding = 0) buffer List {
int size;
ivec4 coords[];
};
coords[0] = ivec4(1.0, 0.0, 0.0, 0.0);
coords[1] = ivec4(2.0, 0.0, 0.0, 0.0);
size = 2;
After this shader i use glMemoryBarrier(GL_ALL_BARRIER_BITS);
Post process shader (Uses SSBO):
-- same layout for SSBO --
// When i fetch data directly - everything works, like here
FragColor = coords[0]; // returns red color
// But when i try to compare values - nothing works
if (coords[0] == ivec4(1.0, 0.0, 0.0, 0.0)) { FragColor = coords[0]; }