Skip to content
Snippets Groups Projects
Unverified Commit 792e66d0 authored by TheJackiMonster's avatar TheJackiMonster
Browse files

Fixed normal inconsistency in trails

parent 78aadff9
No related branches found
No related tags found
1 merge request!106Created initial firework project
...@@ -55,9 +55,14 @@ void main() { ...@@ -55,9 +55,14 @@ void main() {
} }
vec4 viewPositions [2]; vec4 viewPositions [2];
uint viewIndex = instanceIndex;
if (viewIndex > startIndex) {
viewIndex--;
}
for (uint i = 0; i < 2; i++) { for (uint i = 0; i < 2; i++) {
const uint index = (instanceIndex + i) % points.length(); const uint index = (viewIndex + i) % points.length();
const vec3 position = points[index].position; const vec3 position = points[index].position;
viewPositions[i] = view * vec4(position, 1); viewPositions[i] = view * vec4(position, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment