OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps / shaders / terrain_noise_probe.gdshader

11 lines · gdshader ref:
shader_type spatial;
// PROBE: does Godot's shading language accept the shared terrain noise text?
// The only question this answers is whether the .gdshaderinc compiles here.
#include "res://shaders/terrain_noise.gdshaderinc"

void fragment() {
	vec3 wp = (INV_VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
	vec3 g = grad_noised_2d(wp.xz * 0.001);
	ALBEDO = vec3(g.x * 0.5 + 0.5);
}