Skip to content

Performance: LightFilter gets applied even if not needed #1867

@zzuegg

Description

@zzuegg

Hi, during my investigation on my deferred performance i found that the LightFilter gets applied on each RenderManager.renderGeometry()

I looked up on how Jme internally works around this issue when no lights are needed and it seems it does not.

It surely impacts the performance of the AbstractShadowRenderer. At least on objects outside of the view frustum but inside of the shadow frustum the light filtering is not needed.

A quick fix would be to implement:
tmp = RenderManager.getLightFilter(); RenderManager.setLightFilter(null); //Do your stuff RenderManager.setLightFilter(tmp);

what do you think? applying the easy fix or implement a fix at global scale?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions