Войти
  • 15144Просмотров
  • 4 года назадОпубликованоAge of Asparagus

Godot Spatial Shaders - A Gentle Introduction

We’ll be using Godot’s node-based visual shaders to create a very simple material that causes an object's color to be connected to it’s position in 3D space, and specifically it’s depth on the z-axis. I wanted to create a very simple shader for my 3D Top Down Shooter series, and found it way more difficult than I was expecting it to be, so I created this very gentle introduction to spatial shaders for anyone else out there who might have hit the same difficulty that I did. I do my best to explain every step along the way, and I’m hoping this will be useful to anyone who has never touched 3D (spatial) shaders before. I’m new to shaders myself, so I'm probably be oversimplifying a lot of concepts, but we can learn more about those later when we want to to more complicated stuff, right? Timestamps: 0:00 - Intro 0:45 - New scene 1:34 - Fragment processor 3:37 - Vertex processor 6:45 - From vertex to color 12:30 - Global vertex positions 16:50 - Vector Decompose to use only Z position 18:21 - Uniform (export) variables 20:01 - Mixing colors 21:38 - Top Down Shooter plans 22:08 - Saving the material ******************************* Make a 3D Top Down Shooter in Godot: Credits ----------- Get Godot: Editing: nuby nub ( ) Tools --------- Video Editing: Blender Overlays: Krita, GIMP, Inkscape, Draw on your Screen (Gnome shell extension) Recording: SimpleScreenRecorder & Audacity3fgdfg