Make light emission uniform
This commit is contained in:
parent
9576078f9c
commit
127b7a4077
|
|
@ -88,7 +88,7 @@ fn trace_fragment(in: Varying) -> vec4f {
|
|||
let s = spheres[sphere];
|
||||
pos += t * ray;
|
||||
let normal = (pos - s.center) / s.radius;
|
||||
result += vec4(color * s.emit_color * -dot(normal, ray), 0.0);
|
||||
result += vec4(color * s.emit_color, 0.0);
|
||||
color *= s.reflect_color;
|
||||
let diffuse = normal + rand_sphere();
|
||||
let specular = reflect(ray, normal);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user