|
private int singlePassLightBatchSize = 1; |
There’s no reason to prefer multipass lighting in this day and age.
We should default to single-pass lighting by setting this value to anything greater than 1.
It might also be a good idea to have the render manager automatically scale this value up to match the number of lights required by the model with the most lights it renders, with an upper limit of eg. 16 .
pseudo code:
void render(Spatial sp){
....
int nlights = sp.getWorldLights().size();
nlights = min(nlights, 16);
if(nlights>0&&nlights>singlePassLightBatchSize){
setSinglePassLightBatchSize(nlights);
}
....
}
jmonkeyengine/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java
Line 117 in 8cc3086
There’s no reason to prefer multipass lighting in this day and age.
We should default to single-pass lighting by setting this value to anything greater than 1.
It might also be a good idea to have the render manager automatically scale this value up to match the number of lights required by the model with the most lights it renders, with an upper limit of eg. 16 .
pseudo code: