Add Shader freature

Hello GDevelop Development Team,

First of all, I want to thank you for the incredible work you do on GDevelop. It is an amazing tool that has helped many developers, including myself, to create games effortlessly.

I would like to propose an idea to further enhance GDevelop: the integration of shaders. Shaders can offer impressive visual possibilities and allow game creators to add advanced graphical effects, such as dynamic shading, lighting effects, distortions, and much more. Here are a few reasons why I believe integrating shaders would be beneficial for GDevelop:

  1. Visual Enhancement: Shaders can significantly improve the visual quality of games, making graphics more appealing and immersive.
  2. Customization: Developers could create unique and personalized effects, allowing each game to have its own visual identity.
  3. Performance: Shaders can often be more performant than traditional rendering techniques, by offloading certain graphic operations to the GPU.
  4. Innovation: The integration of shaders would encourage developers to innovate and experiment with new visual ideas, enriching the diversity of games created with GDevelop.
  5. Competitiveness: By integrating shaders, GDevelop could more effectively compete with other game engines that already offer this feature.

I understand that adding this feature could require a significant development effort, but I am convinced that it would be worth it and bring substantial added value to GDevelop.

Thank you for considering my suggestion. I look forward to seeing future improvements and new features in GDevelop.

5 Likes

I like the idea shades would be awsome

GDevelop already supports shaders on both layers and objects. They’re called effects in GDevelop, and they’re using PixiJS’s Shader Filter API. They utilize WebGL for GPU based rendering.

You can build your own, but you’ll need to utilize the Shader Filter API and submit a javascript/typescript based PR through the Github. You can read more about the API here: PixiJS API Documentation

If you’re meaning for 3D objects, the above is all true as well (There’s 3D effects/shaders in the same place as 2D), but you’ll need to look up the ThreeJS API.

Ah ok but it sounds complex to setup so it would e nice if someone did it with behaviors

1 Like

Exactly, I had the same idea, that it should allow us to easily create shaders look like extensions. I know it probably won’t be possible in Event sheet, but at least it should allow us to create properties that we can call up in the code and then interact with the custom shader.

2 Likes

i think its more like being able to create your own shader? with the PixiJS shader filter API?? idk

Is there a very easy to understand and practical tutorial for this technique of implementing a custom shader through pixi.js and or otherwise.

It sounds; wild unless for complimentary additions; that a user has to submit code at a master and or branch of a master repo; just so they can; make a sprite shader that is more complex then; imo; the somewhat minimal amount of effects built into gdevelop; honestly don’t know why someone doesn’t just build a open source, decentralized and copyleft license ; universal extensive shader node system; get people away from the GLSL / SPIR-X and or HLSL crap and just; allow people to GUI there way to visual pleasure.

Code converters would be excellent for this task.

Anyways…

Nope. You will have to have a detailed understanding of Javascript, review the PixiJS APIs I linked above, and submit your own shader PRs.

To be clear, my first post above was just providing context on whether the engine supported shaders and how they could be added, because the first reply was someone thinking shaders weren’t already supported.

There are 35 base shaders currently supported, and each have tons of parameters to customize. Whether you feel them minimal or not doesn’t change those numbers. That said, I think it’d be great if there was a GUI based shader builder, but it is still likely going to require people to understand what the PixiJS API supports as the devs and contributors generally don’t make separate addons for native functionality in the renderer, just implement new ways to interact with the existing functionality.

Hmm; okay; PIXIJS and submitting:

PR’s…

How likely are they to be included in my build of GDevelop if so?

Alright; you were trying to provide clarity to another person; so said person can gain a contextual understanding of the shader technology within GDevelop.

Should re-iterate; am not saying there entirely incapable and or so inflexible that there’s nothing of pleasurable healing from them; however; some shaders; not all in terms of flexibility and parameters seems alittle problematic; still was never able to make the water effect; I wanted; the reflection doesn’t work for slanted and or direct; top-down view; from my experience; etc and yeah there’s likely other things but that’s it; really.

Someone should make a water shader that works more in a reflection geometric way; it captures whatever underneath it; in reverse or otherwise (very optional) then can be matrix transformed; however the game-dev wants with extra features; like wave, splash, pulse and more also with extensive parameters and features.

Those are larger numbers am not devouring against that at extensive levels; more and or less; depending on perspective; but am just saying there needs to be more flexibility and parameters in one way and or another; sure if i wanted to; could have made another sprite put it underneath the floor in such a way that it looks like a reflection then add the displacement effect; but that could have all been avoided with a shader that can reflect with tons of easy and practical use parameters for said purposes; perhaps?.

PIXIJS; yep gunna have to look into it hardcore-style; am all for native extendable; but gotta make sure the movements are also outstanding.