Fix: EEVEE-Next: Shader compilation warnings in surfel list

False warnings about variable being used before initialization.
This commit is contained in:
Clément Foucault
2024-01-30 17:26:46 +01:00
parent 39397fd73e
commit 953774fab5

View File

@@ -110,7 +110,7 @@ void main()
List unsorted_list = list_split_after(sorted_list, sorted_list.first);
/* Mutable for-each. */
for (int i = unsorted_list.first, next; i > -1; i = next) {
for (int i = unsorted_list.first, next = 0; i > -1; i = next) {
next = surfel_buf[i].next;
bool insert = false;
@@ -139,7 +139,7 @@ void main()
* are not directly perpendicular to the surface. */
/* Mutable foreach. */
for (int i = sorted_list.first, next; i > -1; i = next) {
for (int i = sorted_list.first, next = 0; i > -1; i = next) {
next = surfel_buf[i].next;
int valid_next = surfel_buf[i].next;