From e398da3aa61ec6a369518e958c50619583344c4f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 7 Oct 2023 01:54:52 -0700 Subject: [PATCH] there was never a normal vector problem --- src/shader.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shader.wgsl b/src/shader.wgsl index f993df4..5addba9 100644 --- a/src/shader.wgsl +++ b/src/shader.wgsl @@ -108,5 +108,5 @@ fn fs_entity_texture(vertex: EntityOutputTexture) -> @location(0) vec4 { let fragment_color = textureSample(model_texture, model_sampler, vertex.texture)*vertex.color; let reflected_color = textureSample(cube_texture, cube_sampler, reflected).rgb; - return mix(vec4(vec3(0.05) + 0.2 * reflected_color,1.0),mix(vertex.model_color,vec4(fragment_color.rgb,1.0),fragment_color.a),1.0-pow(1.0-abs(d),2.0)); + return mix(vec4(vec3(0.05) + 0.2 * reflected_color,1.0),mix(vertex.model_color,vec4(fragment_color.rgb,1.0),fragment_color.a),0.5+0.5*abs(d)); }