You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
I have had already to make scripts that substitute render modes in a shader by grabbing the render_mode text and constructing a string out of it. This is very cumbersome to do.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Visual shaders already offer a much better and flexible interface
EDIT: It's best to do it on ShaderMaterial
I think this interface should be promoted to be a shader interface and that render modes can still be specified in the shader. It would not only alleviate the issue of having 4 copies of the same shader but with different blend modes in the code that needs to be hacked to be kept up to date, but would also make it easier to offer a nice interface for #3373
To not break compat, text render mode can still be supported to override the render modes specified in the inspector.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See above
If this enhancement will not be used often, can it be worked around with a few lines of script?
It's a UX improvement of the shader pipeline and an unblocker for stencil cumbersomeness.
Is there a reason why this should be core and not an add-on in the asset library?
It modfies the engine
The text was updated successfully, but these errors were encountered:
This is something I've noticed a lot when using custom shaders, especially for the various transparency modes. I agree we should have something like this to improve code reuse (and reduce reliance on the preprocessor nowadays).
I guess the flag properties will have to be enums with values Default, Enable, Disable, with Default using the shader source-provided value. The property hint could be Default (Use Shader Source) to clarify this.
From rocket chat discussion: Seems like this would be better suited to live in the material class rather than the shader class, just due to the way shaders are stored on disk to make them easy to open in other editors: they're plain text.
Describe the project you are working on
Godot engine & VFX
Describe the problem or limitation you are having in your project
I have had already to make scripts that substitute render modes in a shader by grabbing the render_mode text and constructing a string out of it. This is very cumbersome to do.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Visual shaders already offer a much better and flexible interface
EDIT: It's best to do it on
ShaderMaterial
I think this interface should be promoted to be a shader interface and that render modes can still be specified in the shader. It would not only alleviate the issue of having 4 copies of the same shader but with different blend modes in the code that needs to be hacked to be kept up to date, but would also make it easier to offer a nice interface for #3373
To not break compat, text render mode can still be supported to override the render modes specified in the inspector.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See above
If this enhancement will not be used often, can it be worked around with a few lines of script?
It's a UX improvement of the shader pipeline and an unblocker for stencil cumbersomeness.
Is there a reason why this should be core and not an add-on in the asset library?
It modfies the engine
The text was updated successfully, but these errors were encountered: