question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance: LightFilter gets applied even if not needed

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
pspeed42commented, Nov 23, 2022

This is why I was curious what revert() was doing… because I couldn’t see how it would work without sharing state with the entire JVM. …a big no-no.

1reaction
pspeed42commented, Nov 23, 2022

If it’s user-code that is calling apply/revert then it could just be on an instance instead of a static method… then you can have as many states as you want.

We’ve got some really nasty shared state issues in the anim package that are very tricky to unwind at this point, so I’m very sensitive to this subject.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use a Blue Light Filter on Your PC or Mac
Blue light from your PC's screen may disrupt your circadian rhythm. Here's how to use a blue light filter with built-in night modes...
Read more >
How to Use a Blue Light Filter on Your Phone | Digital Trends
1. You can turn Night Shift on by opening Control Center and pressing Brightness Control. 2. Then tap the symbol that looks like...
Read more >
Do Apps That Cut Blue Light Help You Sleep? : Shots - NPR
Lots of phone and tablet apps promise to improve sleep by filtering out the blue light from device screens. But that won't help...
Read more >
Reducing Blue Light on Your PC Screen by Using Blue ... - HP
One of the most common side effects of blue light exposure is digital eye strain. If you stare at a computer screen for...
Read more >
The RGB Color Model Test: Test your Blue Light Filtering ...
But first, we'll go through a little background on how color is displayed ... If you are looking to test your blue light...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found