Hello,
For a student project, I made a quick RGB parade with compute shader. It works but there is some artefact in the color parade, aproximately every 20 pixels verticaly, if someone can help me to find the reason, it would be great. Its made with compute shader so, unfortunately, its Windows only…
Jacques
Do you mean the spacing between the red lines? This is because I assume your input movie is 8 bit (so 256 different values per channel) and you’re placing them on a 1080 sized canvas.
Hello Tim,
Thank you for advice. Forcing my 8 bits moviefilein to 16 bits was sufficient to eliminate banding.
I will publish in few days a RGB parade for TD.
All the best,
Jacques
Hello Markus,
Thank to Vincent Houzé, I begin to be in love with compute shader. I like the possibility to affect the result of computation to any pixel.
But perhaps can you help me, if I affect several time a vec4 to the same pixel, it is possible to compose between values (add or multiply) or its only possible to replace the value. To be more explicit, do you think its possible to read the buffer inside the shader, use it in calculus and record it?
All the best, Jacques
Yes that’s possible (if I understand you correctly). If you use imageLoad(mTDComputeOutput[0], ivec2(gl_GlobalInvocationID.xy)); you can retrieve a pixel from the last framebuffer. Similar to a feedbackTOP.
If you mean summing pixel values with arbitrary positions, you would need atomic counters, which I think is a bit tricky and I’m avoiding them as much as possible.