I am not able to write to a SSBO from a fragment shader even though it seems to be bound properly to the opengl context.
Is there anything to take into acount to be able to write to a SSBO from a fragment shader?
According to Graphycs Analyzer the buffer is unmodified.
I found this that seems to indicate that SSBOs can only be written from compute shaders: https://developer.arm.com/documentation/100587/0100/compute-shaders/differences-between-compute-shaders--vertex-and-fragment-shaders/vertex-and-fragment-shaders-features?lang=en
However, it feels weird to me that I am not getting any shader compile / linker error, but instead I get some undefined behaviour when trying to write to a SSBO from a fragment shader, if that is the intended behaviour.
Hi,
You should be able to write to an SSBO in the fragment shader.
It does disable some optimizations, and you'll need to be careful with your memory barriers, but if done correctly, it should work. There are multiple stackoverflow / reddit / khronos community questions that may have suggestions for where you're stuck. If not, please come back with more detail on shader implementation and device you're testing on, so we can see where the problem is.