Calculating normals on the GPU for procedural terrain
Автор: DitzyNinja's Godojo
Загружено: 2023-06-07
Просмотров: 9635
Only 6 months later...
How to calculate normals on a displaced plane using a spatial shader in Godot 4. This video will show you to do this using the plane's vertices or using pixels from a height map texture.
This video builds on two previous videos, but they are not required to understand what is going in this here.
• Massive Infinite TERRAIN that Generates IN...
• Massive Infinite Terrain that Generates In...
Normal Vector to Normalmap pixel function:
vec3 to_normalmap(vec3 n){
n*=vec3(1.0,1.0,-1.0);
n = n/2.0+0.5;
n = vec3(n.x,n.z,n.y);
return n;
}
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: