This is a Godot 4.x project showcasing how to pass custom screen textures around using viewports. These screen textures might include things such as colors, depth values, normals... whatever you need for your project! These textures can then be used in post-processing shaders instead of hint_screen_texture, hint_depth_texture, and hint_normal_roughness_texture.
#Custom Screen Textures (Example Project)
1 messages · Page 1 of 1 (latest)
Custom Screen Textures (Example Project)
I just updated this project. I realized I could use the next_pass property of materials in order to make the object shaders in this project more modular. Basically, the depth info and normal info shaders can be moved to a next pass material instead of being heaped together with the regular color shader. This means the regular color shader can be easily switch out for something different if desired. I've updated the project with this new example, but I've also kept the old, monolithic example in case that works better for someone
Added another update to this project. However, the update relies on Godot features that are currently in PR. So the updates are on a separate branch not merged to main.
- Updated project: https://github.com/thompsop1sou/custom-screen-buffers/tree/requires-material-layer-mask
- Required Godot PR: https://github.com/godotengine/godot/pull/116915