-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Ability to produce geometry or passes from shaders/materials? #6868
Comments
about multipass shader, just for reference : #4084 |
Also about multipass: #862. |
Would this be considered for 3.0? |
First of all thank you for your report and sorry for the delay. We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to. We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors. Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed. Thanks in advance. Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it. |
The part about geometry has a specific issue: #10817 Multipass miiight be solved by the |
@vnen that option disappears when loading shader from file. is it intentional? Edit: apparently next_pass only works with spatial type ShaderMaterial. My shader file was canvas_item type. |
Canvas item shaders and materials seems to not allow multiple passes, I have no idea if is intentional or not. |
Since geometry shaders are handled in #10817 and multi-pass is already supported, I think this issue can be closed. If other parts remain to be addressed, they're better served in a new issue opened against the master branch. |
Maybe the title is not clear enough, but I'll explain:
Multi-pass:
Coming from Unity, I saw it's possible to tell an object to render twice or more only from its shader. For example, it allows to implement 3D outlines easily (draw mesh a second time, but extrude along normals, reverse normals and put it on an opaque pass), perform fur shading by duplicating layers of geometry in parts needing that, or implementing other cool effects that cannot be done in another way.
In Godot, shaders don't go beyond being shaders in the strict term of it. They cannot tell how many passes it has to be rendered properly. Because of that, the node must be duplicated (and then processed twice), or a script has to be added, a self-contained material is not enough. Could such capability be considered in the future?
Geometry generation:
Going a bit further, possibly different area. I know it's possible today to generate geometry from shaders, and so not being forced to do it on the CPU, client-side towards the graphic card. For example, send a low-poly terrain on the graphic card, and subdivide it dynamically on the GPU (is tesselation the right word?). I know this is a fairly advanced topic and might not be supported by some graphic cards, but would it be possible to use it in Godot in the future?
The text was updated successfully, but these errors were encountered: