Skip to content
Snippets Groups Projects
Commit 0ec3e573 authored by elom0n's avatar elom0n
Browse files

fix trail bug

parent da960ac8
No related branches found
No related tags found
1 merge request!106Created initial firework project
......@@ -43,11 +43,16 @@ void main() {
const uint indexOffset = (gl_InvocationID * (INSTANCE_LEN - 1));
const uint instanceIndex = startIndex + indexOffset;
uint count = INSTANCE_LEN;
uint count = min(INSTANCE_LEN, useCount);
if (indexOffset + INSTANCE_LEN > useCount) {
count = indexOffset - useCount;
if(indexOffset >= useCount){
count = indexOffset - useCount;
}else{
count = 0;
return;
}
}
if (count <= 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment