Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DwmBlurGlass custom shader optimization request: don't render layered windows that aren't visible #243

Open
arukateru opened this issue Mar 30, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@arukateru
Copy link
Contributor

Describe the solution you'd like
Windows that are fully covered up by another window should not have the blur rendered. Having many windows on top of each other causes lag even when none of them are visible at all. There is no reason that window titlebars should get rendered when they are not visible on the screen. Other shaders (like Windows 7 shader or Glass8 shader) do not have this problem.

Your reason (tell us why we need it)
It makes a big difference in the performance of GPU rendering. This extends to things like hardware acceleration. If I am even just scrolling a webpage, scrolling can become laggy if there are unseen windows behind the browser.

Describe alternatives you've considered
N/A

Additional context
https://github.com/Maplespe/DWMBlurGlass/assets/84914212/83122697-0550-446d-8706-991621e37cd9

@arukateru arukateru added the enhancement New feature or request label Mar 30, 2024
@Umbrella-TEC
Copy link

This problem also places a heavy load on the CPU.

@ALTaleX531
Copy link
Collaborator

@arukateru The lag isn't definitely caused by rendering blur, there could be other reasons, and since you haven't shared the CPU usage and GPU usage of the dwm during the scrolling period, I can't tell what's causing it yet.
Please provide your OS, CPU and GPU info if you can.

@TorutheRedFox
Copy link

not rendering blur behind the client area can help too

@arukateru
Copy link
Contributor Author

arukateru commented Apr 2, 2024

@arukateru The lag isn't definitely caused by rendering blur, there could be other reasons, and since you haven't shared the CPU usage and GPU usage of the dwm during the scrolling period, I can't tell what's causing it yet. Please provide your OS, CPU and GPU info if you can.

I think it is quite certain that it is, as Glass8 does not have any problem in my hardware, nor does Windows 7 in VMs. If the shader is written in a perfectly optimized way, even to have 100 windows on a horrible integrated graphics card should still not cause more lag if they are all completely not visible on the screen.

Note that the problem is not that overlapping causes lag. In even a great shader, if there are 100 windows stacked on top of each other and they are all visible and in the same spot, nothing covering them, then of course it would cause lag. The problem is that the shader is still actively rendering glass areas that are not currently visible on the screen, areas covered by other windows

But here are the requested information. As you can see at the end of the video, the integrated graphics go to almost 100% when scrolling only after the explorer windows are opened even though they are completely not visible. My OS is IoT LTSC 2021, i9-8950hk, Nvidia Quadro P3200 (the dGPU is only in use because of the OBS studio)

2024-04-0200-06-06-ezgif.com-resize-video.mp4

@ALTaleX531
Copy link
Collaborator

After some testing, I've found that the occlusion optimization for Windows 10's composition engine seems to be broken, and that this issue was fixed in Windows 11. But anyway, we have started trying to add this optimization in our upstream project and it should be merged into DwmBlurGlass later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants