diff options
Diffstat (limited to 'common/shaders/render/lighting_utils.wgsl')
| -rw-r--r-- | common/shaders/render/lighting_utils.wgsl | 4 |
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; |
