in-pass-shadows: add customized light sort
This commit is contained in:
parent
2e9996d498
commit
251511ee00
@ -219,6 +219,18 @@ public final class LightList implements Iterable<Light>, Savable, Cloneable, Jme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sort(Comparator<Light> comparator) {
|
||||||
|
if (listSize > 1) {
|
||||||
|
if (tlist == null || tlist.length != list.length) {
|
||||||
|
tlist = list.clone();
|
||||||
|
} else {
|
||||||
|
System.arraycopy(list, 0, tlist, 0, list.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
SortUtil.msort(tlist, list, 0, listSize - 1, comparator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a "world-space" light list, using the spatial's local-space
|
* Updates a "world-space" light list, using the spatial's local-space
|
||||||
* light list and its parent's world-space light list.
|
* light list and its parent's world-space light list.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user