better colors for the show
This commit is contained in:
parent
13fb710dc7
commit
a98eda1616
|
|
@ -234,7 +234,7 @@ impl Core {
|
|||
const BASE: Sphere = Sphere {
|
||||
position: vec3(0., 0., -BASE_R),
|
||||
radius: BASE_R,
|
||||
color: vec3(0.1, 0.5, 0.0),
|
||||
color: vec3(0.01, 0.03, 0.30),
|
||||
};
|
||||
fn sphere(pos: Vec3, color: Vec3) -> Sphere {
|
||||
Sphere {
|
||||
|
|
@ -246,9 +246,9 @@ impl Core {
|
|||
let scene = Scene {
|
||||
objects: vec![
|
||||
BASE,
|
||||
sphere(vec3(0., 0., 0.1), vec3(1., 0.3, 0.0)),
|
||||
sphere(vec3(0.3, 0., 0.1), vec3(0.3, 1., 0.0)),
|
||||
sphere(vec3(0.1, 0.3, 0.1), vec3(0.3, 0.0, 1.)),
|
||||
sphere(vec3(0., 0., 0.1), vec3(1., 1., 1.)),
|
||||
sphere(vec3(0.3, 0., 0.1), vec3(1., 1., 1.)),
|
||||
sphere(vec3(0.1, 0.3, 0.1), vec3(0.5, 0.03, 0.01)),
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ struct Varying {
|
|||
@group(0) @binding(0) var<uniform> look: LookParams;
|
||||
|
||||
fn colormap(light: vec3f) -> vec3f {
|
||||
let avg = dot(light, vec3f(1. / 3.));
|
||||
let avg = dot(light, vec3f(0.2126, 0.7152, 0.0722));
|
||||
let scale = 1. / (1. + avg);
|
||||
return scale * light;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user