Рет қаралды 16,839
Here's a quick guide on how to set up Compute Shaders in Godot 4, using a practical example by converting the score calculation from my previous video, on Splatoon's ink gun, to be run as a compute shader.
Scripts:
Shader GLSL: pastebin.com/pbGGjrE8
Test Script: pastebin.com/92cvEagc
Final Score Calculator: pastebin.com/wXCqk1nQ
Resources:
github.com/godotengine/godot-...
docs.godotengine.org/en/lates...
Check out these Sebastian lague videos to see what compute shaders can do:
• Coding Adventure: Comp...
• I Spent a Week Making ...
Chapters:
0:00 Intro
0:18 Compute Shader Intro
0:37 Minimum Compute Shader
4:40 Score Calculation GLSL
6:44 Boilerplate
7:54 Texture Uniforms
11:23 Performance Comparison
12:13 Final Script
13:00 Outro