Clean up constants in shaders
This commit is contained in:
parent
09e0feb4ff
commit
8b99a617f4
3 changed files with 7 additions and 6 deletions
|
@ -113,16 +113,12 @@ fn fs_main(vert: VertexOutput) -> @location(0) vec4<f32> {
|
|||
}
|
||||
|
||||
// ambient
|
||||
let ambient_strength = 0.02;
|
||||
let ambient_color = ambient_strength * albedo;
|
||||
let ambient_color = PBR_AMBIENT * albedo;
|
||||
|
||||
var result = ambient_color + total_radiance;
|
||||
|
||||
// tonemap
|
||||
result = result / (result + vec3(1.0));
|
||||
// gamma correction
|
||||
// TODO: seems to already be handled by wgpu?
|
||||
// result = pow(result, vec3(1.0/2.2));
|
||||
|
||||
return vec4<f32>(result, object_color.a);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue