Material graph based custom shaders

As a Roblox developer, it is currently impossible to create custom shaders, restricting high quality materials to a small list provided by the drop down menu, and a small set of post processing effects. Many solutions have been proposed but in my opinion a material graph akin to the unreal engine or blender would be optimal for Roblox in particular. This hides the implemention of shader components from the developer allowing non-essential parts to be removed on compilation to support lower end devices, cross platform compatibility, composibility and modularization (i.e. take a collection of operations and turn it into a single reusable node), and ease of use for builders/artists. Compilation to other shader languages from a high level graph representation can effectively work via macro substitution.

Depending on tools offered a shader made in a graph editor could use value objects as parameters.

Custom shaders are a standard feature in most engines and would visually bring Roblox up to the standard of other engines. Some example uses:

Screen space lensing
Object specific color correction
Parameter based object transformation, i. e. Visual soft bodies, melting, shearing
Alternative projection such as Orthographic or 2D
Physically based procedural textures
GPU Compute (likely unnecessary but still a possibility)

I couldn’t find any requests along this line but I feel it would satisfy many other requests people have. This request I’d imagine is a long shot but it would be crazy useful. There may be moderation concerns and a reliable way to view shaders might be infeasible but I don’t see it very differently as someone building rude content in a game.

176 Likes

I’d like to bump this as the upcoming PBR doesn’t cover most examples I can think of. Every major engine either supports node based or scripted shaders (or both) and there should be no reason for Roblox not to include this feature.

While I understand the performance implications that scripted shaders might experience in Lua, the same cannot be said for node based shaders.

Additionally, I don’t see any problems from a moderation standpoint as coded inappropriate stuff can already be done with little effort.

41 Likes

I’ve found that I’ve needed this feature so much in my most recent projects and the fact that I can’t even use something somewhat close is a real bummer.

The examples of what shaders could do also get me dreaming of what can become. Maybe if more popularity is brought to this post we may actually see this feature come through.

I agree with @nooneisback 's statement and after doing some reading myself, I also see no reason as to why they wouldn’t at least add node based shaders.

10 Likes

Please, please! I need this. Realism could be a possibility with this feature

2 Likes

Roblox please! We NEED shaders!! Every other engine has them, there is an old “why we can’t have nice things” post listing reasons why roblox can’t provide such effects for us but guess what…it’s 7 YEARS OLD, that’s insane how we didn’t get I believe a single post-processing effect since then? Or well a single from the requested ones at a time, we need area/specific blurs, distortions, decaying, melting effects come on guys this effectively exists in studio as seen here:

it is effectively in the engine wether it is by accident or not doesn’t matter just allow glass to have the same effect on low graphics and job done? There is NO CHANCE it puts enough weight on performance alone, without all the other things that come with increasing your graphics level this one feature alone now just my opinion would make a difference so small it would be considered a nuisance. Now of course I’m not some engineer engine expert I do not know how the roblox engine works at all I’m just assuming because this distortion works? Like even with water you guys enabled it there too, the distortion effect is what I need the mosttt it could help me so much you can’t imagine, every single effect needs it I’ve went so far I had to add lines checking if the player has their settings above 8 for such effects to be executed so they don’t look like plain blue sky-reflecting parts?? We need a new post regarding why Roblox “can’t” give us these kinds of effects, I’m bragging about distortions as an example by the way, an example of “you have it…you just can’t use it lol”, now please correct me if I’m wrong but imagine there was no shadow increases, no sun rays, no outline detail increases when upping your graphics levels, would this distortion alone cause any noticeable performance drop? I am again assuming not but correct me anyway. A TON of other games that run SMOOTHLY have these kinds of effects on the “veryyyyy lowwww” settings…come on man.

I am not saying implementing these would be easy for roblox of course as I’m not a professional I’m not saying magically make it happen atleast update us on why you can’t like you did 7 YEARS AGO

By the way I’m refereing to this post here

16 Likes

There are so many visual effects and techniques that I could achieve with custom shaders. I dream of the day being able to make custom shaders on Roblox!

4 Likes

Windscreen mist is an essential part of driving games (cars and trains) that helps sell immersion better, having the window mist up when its raining or cold or whatever other factors could cause it is an essential feature.

Having shaders is a must have to implement features like this

6 Likes

Create a tool like Shader Graph, and we would avoid all dangerous things “why Roblox can’t enable custom shaders”.
I can totally understand why manually written shaders aren’t enabled, mainly because Roblox supports multiple rendering APIs, which implies, that we would have to write our shaders multiple times for different APIs (GLSL, HLSL, …), and that it could be dangerous for the end user. However, Shader Graph (also node-based shaders) could be well implemented with support for different APIs and would deny any developer and damage they could do to the end users. Win for both sides.

10 Likes

custom shaders! ! Insane with fire!

3 Likes

As a developer this would be amazing since it would really let my game shine. As of now many effects are not only hard to pull off, but also way less performant than a shader. In many cases for effects I have to use many parts when a shader could do it effortlessly. I’ve also wanted to add screen space effects but that’s currently impossible. Id also love to be able to add foam where the water and land intersects among many other things. There are so many reasons why this would be great, and I even have a use for the gpu compute if we got that. I’d use it to efficiency generate terrain in my game I’m working on.

Also no this isn’t a performance issue. With lua we can already lag our games to death if we coded it badly, so shaders shouldn’t be any different than that.

7 Likes

Please. We need shaders for so many effects that are dependent on them and the basics of VFX such as mesh scrolling. This is one of the staple features that have to be included in a game engine and I feel like it’s the main bottleneck as of now for Roblox becoming on par with other engines.

5 Likes

This is something I’ve wanted for a long time, especially for things such as ocean water. Smooth terrain water, despite tons of optimization over the years, still cannot be used for an infinite sea-based map, and neither can triangle mesh deformation water (unless your game has barely any other client side code running)

It’s kinda sad how games like Assassin’s Creed Black Flag (which released 10 years ago) has better water than what’s possible in roblox, even with the use of custom materials

11 Likes

That would have only made sense back around 2012. You can compile HLSL shaders into GLSL, the same way you can compile OpenGL GLSL into Vulkan GLSL. Besides that, almost every engine besides Roblox supports some kind of a custom shading language that then gets compiled into whatever API you’re using. My guess is that the main reason they never added one, besides maintaining a second language being hard, is also because of malicious actors. Dealing actual damage to a GPU through shaders is really hard, but it’s definitely possible to BSOD a system.

7 Likes

Still super unfortunate that this hasn’t been implemented yet. A way to write custom shaders would be for ROBLOX what the industrial revolution was for Europe, It offers so many creative opportunities, it’s a shame we don’t have that opportunity yet. Bump!

8 Likes

Imagine the possibilities: Black hole lensing, atmospheric scattering…

7 Likes

This might get flagged for bumping, but that’s okay.

It’s been four years with no response on this from ROBLOX’s end. Modifying the engines shaders would be game changing, and arguably could be one of the biggest changes ROBLOX could implement, and boost so many games in their own unique way.

Why isn’t this being talked about more?

For those of you who don’t know what modifying the shader would allow; essentially its changing how things are rendered on a per-pixel basis. You could create very unique and amazing visual effects, lighting, and so much more. Look in to it!

7 Likes

well here is problem i see with this here.

  1. having something like this seems to be a more easy way of spreading viruses because “shading modifications” have to be able to go to “person a” which would be you the game developer to "the almighty: which is he server then from there it has to go to “the masses” which is the people who play your game that would be using the shading you had implemented in your game which leads me on to my second point.
  2. while it might be nice this would come with a bunch of performance and graphical issues for example say i was playing said game that used this. my phone may not have the computing power and or the correct graphics card to be able to run said shading.

what…?

Sure, there may be issues in regards to graphics; but that’s how it is right now anyways? If you put future lighting on a map with a dense part count; you can expect lag. The point being: it’s the creators job to ensure the game can perform well- which would be same case with shaders. If a creator creates their own shader that isn’t performant, it’s no different then them creating a script or a map that’s non-performant as well.

As for spreading viruses, that’s just not true. Can’t say much more on that.

12 Likes

A spin on Unitys Shader Graph would be great.

2 Likes

This would only be a vulnerability if users can write their own HLSL shaders using the language directly. A shadergraph is using pre-defined HLSL code snippets that users can connect freely on their own. The chance of malware or malicious code being embeddable in them is very low.

4 Likes