Does pumping parameters on WebGL fx hit GPU/CPU?

0 favourites
  • 3 posts
From the Asset Store
Impact fx, explosions, fireballs, puffs of smoke, magic fx, lightning fx, bonus & pick-up fx, blood splatters, and more
  • I didn't know how to phrase the question better, but I am developing a very aesthetic heavy game, with a sizable amount of WebGL fx, I'm naturally trying to keep it at a minimum. It's going to be published on the AppStore once either Ludei's CocoonJS or iOS 7 make WebGL on Apple mobiles possible.

    Long story shortish, I was optimizing effects, removing where I can, I started thinking if increasing the value for example Glass WebGL effect "Density" would have a major impact on the GPU/CPU? I want to know if I can play with very big values for WebGL parameters, especially on the glass WebGL fx. I set it up to 10000 right now and I'm getting exactly what I need visually. But the OCD fear is there, that it might be a tumor on the CPU/GPU and slow the game considerably.

    Could someone help out an obviously lost man find his path?

    I will find the most sublime ASCII cake if I get an answer.

    I'm new to Construct 2, but not programing and game dev, I'm loving it almost as much as some of my favorite vital organs.

    Thank you

  • The particular value a shader parameter takes usually will have no effect on performance. For example the Glass shader's density can be anything, and exactly the same code runs but just with different values. Usually that means the performance is the same. (It's possible a shader will do something like loop a number of times based on a parameter, but I think most don't do that.)

    The act of setting a shader parameter does incur a minor bit of extra CPU overhead. However unless you're really hammering it (e.g. setting 100 different shader parameters every frame) it probably won't be a noticable difference.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is like honey to my ears. A comfortable and pleasant honey. Which you actually eat via the ears or something.

    Thank you Ashley.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)