summaryrefslogtreecommitdiff
path: root/common/shaders/render/lighting_utils.wgsl
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-28 02:39:04 +0100
committerskal <pascal.massimino@gmail.com>2026-02-28 02:39:04 +0100
commit472c2258dbeca000a454ea1781f09df63477563e (patch)
tree98ac75c3824f19f4a598a807b3cb6aa13e8cb0c3 /common/shaders/render/lighting_utils.wgsl
parent1c5a9fb7b8c704a59ec58894adf46d73d1615072 (diff)
replace wgsl type: vec4<f32> -> vec4f ..
Diffstat (limited to 'common/shaders/render/lighting_utils.wgsl')
-rw-r--r--common/shaders/render/lighting_utils.wgsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/shaders/render/lighting_utils.wgsl b/common/shaders/render/lighting_utils.wgsl
index d2fd2e2..f805860 100644
--- a/common/shaders/render/lighting_utils.wgsl
+++ b/common/shaders/render/lighting_utils.wgsl
@@ -1,5 +1,5 @@
-fn calculate_lighting(color: vec3<f32>, normal: vec3<f32>, pos: vec3<f32>, shadow: f32) -> vec3<f32> {
- let light_dir = normalize(vec3<f32>(1.0, 1.0, 1.0));
+fn calculate_lighting(color: vec3f, normal: vec3f, pos: vec3f, shadow: f32) -> vec3f {
+ let light_dir = normalize(vec3f(1.0, 1.0, 1.0));
let diffuse = max(dot(normal, light_dir), 0.0);
let lighting = diffuse * (0.1 + 0.9 * shadow) + 0.1; // Ambient + Shadowed Diffuse
return color * lighting;