Add warning for too many objects
This commit is contained in:
parent
de5dad1e6e
commit
63a1772afa
1 changed files with 6 additions and 1 deletions
|
|
@ -80,7 +80,12 @@ export class UniformArrayAutoScalingProgram implements IProgram {
|
||||||
|
|
||||||
const closest = this.programs.find((p) => p.values.every((v, i) => v >= values[i]));
|
const closest = this.programs.find((p) => p.values.every((v, i) => v >= values[i]));
|
||||||
|
|
||||||
this.current = (closest ? closest : last(this.programs))?.program;
|
if (closest) {
|
||||||
|
this.current = closest.program;
|
||||||
|
} else {
|
||||||
|
console.warn(`Not found compiled shader for this many objects ${values}`);
|
||||||
|
this.current = last(this.programs)?.program;
|
||||||
|
}
|
||||||
|
|
||||||
if (closest) {
|
if (closest) {
|
||||||
this.descriptors!.map((d, i) => {
|
this.descriptors!.map((d, i) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue