This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can I write to a SSBO from a fragment shader?

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.

Parents
  • 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.

Reply
  • 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.

Children
No data