Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen-Reading Shader Visualizer #10809

Open
Cass-dev-web opened this issue Sep 22, 2024 · 4 comments
Open

Screen-Reading Shader Visualizer #10809

Cass-dev-web opened this issue Sep 22, 2024 · 4 comments

Comments

@Cass-dev-web
Copy link

Cass-dev-web commented Sep 22, 2024

Describe the project you are working on

Currently working on a game which makes heavy use of shaders to pull the entire aesthetic together.

Describe the problem or limitation you are having in your project

Not being able to visualize the shader I'm working on is pretty annoying - considering I have to rerun the entire scene to simply be able to see my changes.

I've recently switched to Godot 4.3 from 4.2.1 and it broke my shaders being visualized on the editor.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I'd like to see an option under the 3 dots next to the "Perspective" label to be able to enable/disable color rect shaders being rendered as if in-game.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Not sure how the internal rending program works, but ideally, the option, once enabled, should find & render all Color Rects with a shader attached, then display that on the editor viewport, while also EXCLUDING gizmos and taking in account the position of the editor viewport camera.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It could be used often by shader, and 3D developers, but that's only theoretical, as I don't see a lot of requests for such feature...

Is there a reason why this should be core and not an add-on in the asset library?

It adds functionality to the editor, which can make it more approachable to shader or Godot beginners.

@Cass-dev-web Cass-dev-web changed the title Screen-Reading Shader Visualiser Screen-Reading Shader Visualizer Sep 22, 2024
@clayjohn
Copy link
Member

Can you clarify a bit more why you can't see your shader in the editor? All shader types should work fine in the editor.

Is it just a matter of having the right objects in the right place? Or maybe the inconvenience of moving the editor camera to cover the ColorRect that has the shader attached?

@Cass-dev-web
Copy link
Author

Cass-dev-web commented Sep 22, 2024

Can you clarify a bit more why you can't see your shader in the editor? All shader types should work fine in the editor.

Is it just a matter of having the right objects in the right place? Or maybe the inconvenience of moving the editor camera to cover the ColorRect that has the shader attached?

I have a shader which is attached to a ColorRect, a child of a CanvasLayer:
image

For the shader, I've used this one found in the Custom post-processing documentation. When in the editor, the shader is not rendering. However, when in-game, the shader works fine.

I use the following properties for my ColorRect (-64 to ignore UI):
image

@clayjohn
Copy link
Member

That sounds like a bug, especially if it was working in 4.2, but isn't working in 4.3.

Although, is there any chance that something is drawing in front of your canvas layer? A layer of -64 is pretty far back. Also, can you confirm that you don't change the canvas layer layer at runtime?

@Cass-dev-web
Copy link
Author

That sounds like a bug, especially if it was working in 4.2, but isn't working in 4.3.

Although, is there any chance that something is drawing in front of your canvas layer? A layer of -64 is pretty far back. Also, can you confirm that you don't change the canvas layer layer at runtime?

That's right, I'm not changing the canvas layer at runtime. Even at layer 128, and other stuff being disabled, the shader is still not rendering on the editor viewport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants