happy-turtle / oit-unity

Order-independent Transparency Implementation in Unity with Per-Pixel Linked Lists

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect stride?

bpepers-me opened this issue · comments

In OrderIndependentTransparency.cs you define the buffer stride as:

int bufferStride = sizeof(float) * 5 + sizeof(uint);

But the actual struct has 5 float and 2 uints so it should be:

int bufferStride = sizeof(float) * 5 + sizeof(uint) * 2;

Perhaps this wasn't updated when coverage was added to the struct?

Yes, I think you are absolutely right, thanks! That means the buffer is smaller than expected. Maybe fixing this will reduce the overall occurence of rendering errors.

Should be fixed with 2f7e5d4.