Minor notes

master
Mark 2023-12-24 12:12:02 -08:00
parent f350b67a66
commit 08dd0e1c64
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 8 additions and 2 deletions

View File

@ -104,8 +104,11 @@ var sampler_array: binding_array<sampler>;
// Fragment shader // Fragment shader
@fragment @fragment
fn fragment_shader_main(in: VertexOutput) -> @location(0) vec4<f32> { 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 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_top = vec3<f32>(0.369, 0.819, 0.796);
let c_bot = vec3<f32>(0.979, 0.556, 0.556); 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], sampler_array[global.starfield_texture.x],
in.texture_coords, in.texture_coords,
0.0 0.0
).rgba * vec4<f32>((c_top + c_del * c) * b, 1.0); ).rgba * vec4<f32>(
(c_top + (c_del * c)) * b,
1.0
);
} }