Skip to content

Increase the default singlePassLightBatchSize value. #2564

@riccardobl

Description

@riccardobl

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);
    }
   ....
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions