Giter Site home page Giter Site logo

blur-bg's Introduction

BlurBG

This is where she makes a mod.

blur-bg's People

Contributors

thesillydoggo avatar

Stargazers

Armando Hinojosa avatar morsee avatar rooot avatar

Watchers

 avatar

blur-bg's Issues

shader VERY unoptimized; duplicate blur nodes on some layers

description

I decided to make this a single issue - the mod currently has two major problems:

  • The blur shader used is very very unoptimized
  • on some layers/pages/popups, CCBlurLayer gets added multiple times, causing further performance issues

I would consider my system more than able to run shaders (especially simple things such as blur!), even in parallel.
(see attached video below)

2024-05-14.12-34-42.mp4

side note: i intentionally made the CCBlurNodes invisible using devtools to show their performance impact

my system

  • CPU: AMD Ryzen 5 5600X @3.7GHz
  • GPU: AMD Radeon RX 6900XT (roughly equivalent to an NVIDIA RTX 3080-ish)
  • RAM: 48GB of corsair vengeance DDR4-3200, quad channel config
  • OS: Arch Linux, GD running through GE-Proton9-5

reproducing

  • the shader lag:
    • open a popup that has multiple sub-popups
    • frametime significantly jumps up at 3 visible CCBlurLayers on my system, becomes unusable at 4
  • the CCBlurNode duplicating:
    • open almost any popup, examples:
      • quests/ChallengesPage creates 3
      • DailyLevelPage creates 2
      • GJPromoPopup creates 2
      • GJPathsLayer creates 2
      • GJPathPage creates 3
      • ProfilePage creates 2
      • CharacterColorPage creates 3
      • (this list is not exhaustive)

possible fixes?

for the shader lag, rewrite the shaders to be more optimized

for the duplicate nodes, keep track whether or not a CCBlurNode has already been created or not.
another cool thing would be to just have a single CCBlurNode even for nested shaders that adapts its blur strength using a glUniform instead of creating a new shader instance for every sub-layer. this could also fix the shader lag mentioned above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.