Minor notes
parent
f350b67a66
commit
08dd0e1c64
|
@ -104,8 +104,11 @@ var sampler_array: binding_array<sampler>;
|
|||
// Fragment shader
|
||||
@fragment
|
||||
fn fragment_shader_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
let b = 1.0 - (in.tint.x / 1.2); // brightness
|
||||
let b = 0.8 - (in.tint.x / 1.5); // brightness
|
||||
let c = in.tint.y; // color
|
||||
// TODO: saturation
|
||||
// TODO: more subtle starfield
|
||||
// TODO: blur stars more?
|
||||
|
||||
let c_top = vec3<f32>(0.369, 0.819, 0.796);
|
||||
let c_bot = vec3<f32>(0.979, 0.556, 0.556);
|
||||
|
@ -116,5 +119,8 @@ fn fragment_shader_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
|||
sampler_array[global.starfield_texture.x],
|
||||
in.texture_coords,
|
||||
0.0
|
||||
).rgba * vec4<f32>((c_top + c_del * c) * b, 1.0);
|
||||
).rgba * vec4<f32>(
|
||||
(c_top + (c_del * c)) * b,
|
||||
1.0
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue