godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.44k stars 1.52k forks source link

Add Compositor Effects (Post-Processing) demo #1058

Closed BastiaanOlij closed 1 month ago

BastiaanOlij commented 1 month ago

This demo project shows two fairly simple examples on how to use compositor effects to create post effects.

The example that is in use applies a template shader into which user code can be injected, this user code is stored in a property on the compositor effect. The second example uses a glsl file containing the full compute shader, which is compiled at initialisation and then used.

image

I'm working on a documentation page for the Godot documentation that will provide more detail and uses this demo project as its base.

This replaces #942 as a simpler example. This demo is based on the project build during this stream: https://www.youtube.com/watch?v=KLmahauWeV4

BastiaanOlij commented 1 month ago

Just a ping, it would be nice if we could merge this now that the documentation pages referring to this demo have been merged.

Calinou commented 1 month ago

New demos should have type hints in their scripts following https://github.com/godotengine/godot-demo-projects/pull/1063. I'll look into pushing a commit on top of this PR today then this should be good to merge :slightly_smiling_face:

Edit: Done in 1bfede7 (#1058). Some other changes were made in the process (see commit message).

Calinou commented 1 month ago

Thanks!