shader changes that don't do anything
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 19s
Create tag and build when new code gets to main / Export (push) Successful in 9m48s

This commit is contained in:
2026-01-07 17:11:49 +01:00
parent fffd8c947b
commit f2a39316ba
2 changed files with 17 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
[gd_resource type="VisualShader" format=3 uid="uid://ce18qeqecjf4w"]
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, depth_test_default, cull_back, diffuse_lambert, specular_schlick_ggx;
"
nodes/fragment/0/position = Vector2(280, 0)

View File

@@ -28,6 +28,7 @@ uniform float heightScale = 1.0;
varying vec3 worldPos; varying vec3 worldPos;
varying vec3 worldNormal; varying vec3 worldNormal;
varying vec3 diffuse;
void vertex() { void vertex() {
@@ -177,12 +178,14 @@ void fragment() {
// sample and output // sample and output
SPECULAR = specular; SPECULAR = specular;
ALBEDO = triplanarSample(texCoordX, texCoordY, texCoordZ, blend, yDot).rgb; ALBEDO = triplanarSample(texCoordX, texCoordY, texCoordZ, blend, yDot).rgb;
diffuse = ALBEDO;
ROUGHNESS = triplanarRoughness(texCoordX, texCoordY, texCoordZ, blend, yDot).r; ROUGHNESS = triplanarRoughness(texCoordX, texCoordY, texCoordZ, blend, yDot).r;
NORMAL = mix(worldNormal, triplanarNormal(yDot, texCoordX, texCoordY, texCoordZ, blend), normalMapStrength); NORMAL = mix(worldNormal, triplanarNormal(yDot, texCoordX, texCoordY, texCoordZ, blend), normalMapStrength);
NORMAL = normalize((VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz); NORMAL = normalize((VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
} }
//void light() { void light() {
// // Called for every pixel for every light affecting the material. float lambert = dot(NORMAL, LIGHT);
// // Uncomment to replace the default light processing function with this one. float halfLambert = pow(lambert*0.5 + 0.5, 2);
//} DIFFUSE_LIGHT = halfLambert * ATTENUATION * LIGHT_COLOR / PI;
}