User Tag List

Results 1 to 5 of 5

Thread: Invert Shader Slowdown on Ryzen APU

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    496
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Invert Shader Slowdown on Ryzen APU

    Been running into an issue on my Ryzen 2500U laptop. The issue springs from using Invert shaders on our background paintings. The image is inverted at grayscale before saving, and we then apply the invert shader in-game in order to give it its original look with a single color on top (essentially creating a Screen instead of a Multiply).

    windmillShader.jpg

    Each background image is built up of several chunks, which are then loaded in externally (so you can bring in your own backgrounds too!). On a system with dedicated graphics this works great and the game really never drops below 60fps unless there are over 200-some active objects on screen. However, on integrated graphics, having backgrounds on slows the game down immensely. The results are the same whether using Backdrop objects or pasting into background (which I find particularly interesting, as shouldn't the Invert shader no longer be an issue if the image is pasted?). I've tried both shaders and the oldschool Ink Effect, the results are the same. The only thing I haven't tried is bringing in a single 1920x1080 image instead of smaller square chunks, but instinct says that may not help and would just fill up the VRAM.

    Does anyone have any ideas? Any better, less code-y solutions to achieving a screen effect just with RGB Coefficients?
    Images attachées Images attachées

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    911
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    @dsilvers : I didn't even know that it's possible to apply a shader, then add or paste as backdrop I just tested this with my game with a simple hue shader, but it actually induces a lag (I'm on integrated graphics). Seems some render overhead is called in this case that demands additional resources for those shader-altered tiles. Don't know if it is doable for your setup, but I generally avoid applying shaders to individual objects at all. I only apply to layers and move all objects that need to be altered to their shader layers at the end of the frame loop. At the beginning of the frame loop I move objects back where I need them to collide and interact. This is very cheap compared to individual object-based shaders.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    496
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Julian82 Invert the layer... hmmmmmmmmmmMMMMMMMMMM that actually might work. I have other objects that use Invert as well (gems, which need white for shininess but also need color applied to them). But for those I could probably also put them on their own layer and have another collider on the player just for them, thus avoiding the overhead of having to redo all the individual RGB Coefficient calls I'm making.

    I'll let you know how this goes. Thanks for the idea!

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    496
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Julian82 Status Report: YOU ARE MY HERO. Game's working 1000x better on the laptop now. Thank you for the tip! I'll definitely be able to optimize the rest now very easily.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    911
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    Cool! Glad this was an easy fix for you^^

Similar Threads

  1. Replies: 4
    Last Post: 17th February 2016, 10:46 AM
  2. Possible to invert a string or value?
    By Outcast in forum Fusion 2.5
    Replies: 1
    Last Post: 12th March 2014, 06:23 PM
  3. Invert blend
    By Looki in forum Shaders
    Replies: 0
    Last Post: 20th March 2010, 01:44 AM
  4. [Request] Invert Selection
    By Jaffob in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th April 2009, 07:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •