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 project you are working on:
A sliding puzzle game in 2D for Android devices.
Describe the problem or limitation you are having in your project:
I am using the Visual Shader editor to create my effects and it is perfect for beginners. I can visualize what is going on in each node with the mini-preview.
Because I reuse the same shader for multiple pieces of the puzzle and each piece is slightly different, I need to use uniforms values to customize behavior in-game.
But nodes taking uniforms as inputs don't know its value and cannot make a relevant preview. As a workaround, I currently have constants that I plug as inputs instead of the uniform to see how it affects my shader.
I can edit shader uniforms in the inspector but this only affects the scene view, not the preview in intermediate nodes.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
It would help exploration to have default value for uniforms. The uniforms nodes would contain a name, a type (eg. VectorUniform), and a default value.
We then will be able to change the uniform value as we edit the shader. This will help try debugging the shader in different configuration and have correct preview of nodes taking uniforms as inputs.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The xxxUniform node in the editor would have a new "default value" field, which would a copy of the content of the xxxConstant node.
Setting default values for uniforms is already possible in the shading language: https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html#uniforms
So I suppose the generated shader would simply set this attribute.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I currently have a workaround for it by adding a constant node and plugging it instead of the uniform but it is error-prone because I need to replug the uniform node when I am done working on a shader.
My proposal is mainly "quality-of-life" for the Visual Shader editor but I believe it will help newcomers such as myself working with shaders.
Is there a reason why this should be core and not an add-on in the asset library?:
I believe the scope of the proposal is the same as the scope for uniform nodes, and should be core.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on:
A sliding puzzle game in 2D for Android devices.
Describe the problem or limitation you are having in your project:
I am using the Visual Shader editor to create my effects and it is perfect for beginners. I can visualize what is going on in each node with the mini-preview.
Because I reuse the same shader for multiple pieces of the puzzle and each piece is slightly different, I need to use uniforms values to customize behavior in-game.
But nodes taking uniforms as inputs don't know its value and cannot make a relevant preview. As a workaround, I currently have constants that I plug as inputs instead of the uniform to see how it affects my shader.
I can edit shader uniforms in the inspector but this only affects the scene view, not the preview in intermediate nodes.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
It would help exploration to have default value for uniforms. The uniforms nodes would contain a name, a type (eg.
VectorUniform
), and a default value.We then will be able to change the uniform value as we edit the shader. This will help try debugging the shader in different configuration and have correct preview of nodes taking uniforms as inputs.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
The
xxxUniform
node in the editor would have a new "default value" field, which would a copy of the content of thexxxConstant
node.Setting default values for uniforms is already possible in the shading language: https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html#uniforms
So I suppose the generated shader would simply set this attribute.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I currently have a workaround for it by adding a constant node and plugging it instead of the uniform but it is error-prone because I need to replug the uniform node when I am done working on a shader.
My proposal is mainly "quality-of-life" for the Visual Shader editor but I believe it will help newcomers such as myself working with shaders.
Is there a reason why this should be core and not an add-on in the asset library?:
I believe the scope of the proposal is the same as the scope for uniform nodes, and should be core.
The text was updated successfully, but these errors were encountered: