0 votes

The setup is: one single scene with one copy of each object in it. Each object has a mesh. This mesh has a texture and also has vertex color information different as the one from the texture.
The goal is some method that allows to compose a final render with:
1) a pass that render the albedos (textures) in a viewport (easy, is the deafult behaviour).
2) a second pass who renders not the albedos but the vertex colors of the meshes in order to do some calculations over them and add some details to the final render. It needs to be done over the viewport becasuse this details are view-dependent. (Something like but no quite this thread: https://twitter.com/georgebatch/status/1040996814202318848 )

Is this even possible in godot? I was trying some aprroaches but did not get how to access the mesh-vertex-color info once it has render the albedo in the first pass. Same if I render first the vertex color, then I´m not able to access the albedo. Any ideas?

Thx!

Godot version 3.3.3
in Engine by (53 points)

I don't believe you can natively render different "data" out of the same materials. The only (hacky) ways of doing this I can think of would be to either do a second render after having put a unshaded-vertex-color-to-albedo material override on all meshes in the scene or do a second render but this time using duplicate meshes on a different layer.
I don't know for sure if this is impossible in 3.x.
I believe things have improved in that regard in 4.0? Not sure.

I can't do much more than that, sorry. Good luck!

Thx!
Yep, the duplicate-all-objects-with-different-shaders appears to be the only solution in Godot, at least in 3.x. Very bad in terms of permonance. :(

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.