Godot Documentation: Custom Post-Processing
Repository
https://github.com/godotengine/godot-docs
Which are the docs for
https://github.com/godotengine/godot
A blur shader applied as a post-processing effect
Details
The documentation walks the user through implementing a custom post-processing effects in Godot. The two main branches of the doc are single and multi-pass post-processing. In the case of single pass, the documentation walks the user through writing a full screen sobel filter (for edge detection). The example from the docs is provided below:
For multi-pass post-processing the document explains the relevant differences from single pass post-processing and provides code for a 2-pass blur effect (imaged at the top of this post). The big difference between the two is that with multi-pass you have to be careful about the render order. Users need to be aware of when each step happens, because for certain post-processing effects order matters.
As with many of the docs I write, the length ended up being much longer than I had hoped, but overall it was shorter than normal. My current goal is to document more features of Godot that regular users are missing. We get people asking questions on discord frequently like "why cant you write your own post-processing shaders in Godot?" And the answer is you can! It just isn't well documented. I aim to help fix that. Next up will be a small one explaining how to read from the depth buffer. After that I think I will do some longer ones on using the SurfaceTool and MeshDataTool to generate geometry.
Components
The documentation teaches the user how to implement custom post-processing in Godot. Godot provides a number of common post-processing effects available out of the box (including depth of field, bloom, and SSAO) but sometimes the user wants to write their own. Godot facilitates this in a few different ways. The tutorial teaches the user how to write a pass post-processing shader using a Viewport and a ViewportContainer. In my opinion this is the best way to write a post-processing shader in Godot as it gives the user complete control over the pipeline. The alternative (which is mentioned in the documentation as well) is to just render something over the screen and use the SCREEN_TEXTURE from the shader, and in the case of a multi-pass shader use multiple BackBufferCopies.
Links
http://docs.godotengine.org/en/latest/tutorials/viewports/custom_postprocessing.html
GitHub Proof of Authorship
- GitHub Account: https://github.com/clayjohn
- Pull Request: https://github.com/godotengine/godot-docs/pull/1786
Leave Godot Documentation: Custom Post-Processing to:
Read more #utopian-io posts
Best Posts From Clay John
We have not curated any of clayjohn's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Clay John
- Godot: Bug Fixing
- Godot Development: MSAA in the GLES2 backend
- Godot Documentation: Introduction to Shaders series
- Godot Documentation: Differences between GLES2 and GLES3
- Godot Documentation: Animating Thousands of Objects
- Godot Documentation: Shader Reference
- Godot Documentation: Advanced Post-Processing
- Godot Documentation: Custom Post-Processing
- Godot Documentation: Shader Migration Guide
- Godot Documentation: Using a Viewport As a Texture
- Godot Documentation: Lights and Shadows in 2D
- Godot Vertex Shader Documentation
- Godot Viewport Documentation
- Documentation for Godot | PanoramaSky and ProceduralSky
- Building a Procedural Solar System in Godot
- Updates On World Generation and Passing Data From CPU to GPU
- Post Processing with three.js
- Into The Great Abyss: A game about exploration and resource management
- Learning 3D Graphics With Three.js | Raycasting Part 2
- Learning 3D Graphics With Three.js | How To Use a Raycaster