RESOLVED: [ Win10 x64 2020.25380 ] Render Top ImageLoad() and imageStore possible bug

So I’m using these 3 lines in my vertex shader:

vec4 buf = imageLoad(mTD2DImageOutputs[0], ivec2(0,0) );
buf.x += 0.01;
imageStore(mTD2DImageOutputs[0], ivec2(0,0) , buf );

The value being written I’d expect to climb by the increment of 0.01 each frame, since I’m reading it from the buffer, incrementing, then writing it out again.

In the docs, it says this about the access parameter:

Controls how the output textures will be accessed. If the textures will be read from (such as using previous frame’s values), then the access should be changed to Read-Write instead of Write Only.

Is there something broken here? Or am I using imageLoad and imageStore incorrectly?

Thanks!

renderTop_imageLoad_imageStore_bug.8.toe (4.5 KB)

Ya there’s an issue with the docs, the buffer is cleared to 0 every frame. Read-Write would be if you are using it within a frame for read/write operations. I’ll update docs, sorry about that.

For now, you can use a Feedback TOP to bring the previous frames value back in (via a sampler)

awesome thanks! that’s the route I went with, appreciate the insight.