recursive reflection for nontransparnt elements
This commit is contained in:
parent
ffbba3be19
commit
dc66ae4b3d
5 changed files with 162 additions and 101 deletions
src/scene
|
@ -73,7 +73,7 @@ impl Scene {
|
|||
color: vec3(shade, 1.0, shade),
|
||||
tex_coord: vec2(0.0, 0.0),
|
||||
transparent: false,
|
||||
roughness: 128,
|
||||
roughness: 0,
|
||||
};
|
||||
|
||||
oct_tree.set_cube(cube.clone());
|
||||
|
@ -83,19 +83,19 @@ impl Scene {
|
|||
let shade = (rng.gen_range(0..25) as f32) / 100.0;
|
||||
let cube = Cube {
|
||||
pos: vec3(10.0, 10.0, 10.0),
|
||||
color: vec3(1.0, 0.0, 0.0),
|
||||
color: vec3(1.0, 1.0, 1.0),
|
||||
tex_coord: vec2(0.0, 0.0),
|
||||
transparent: true,
|
||||
roughness: 32,
|
||||
transparent: false,
|
||||
roughness: 0,
|
||||
};
|
||||
oct_tree.set_cube(cube.clone());
|
||||
|
||||
let cube = Cube {
|
||||
pos: vec3(10.0, 10.0, 9.0),
|
||||
color: vec3(1.0, 0.0, 0.0),
|
||||
color: vec3(1.0, 1.0, 1.0),
|
||||
tex_coord: vec2(0.0, 0.0),
|
||||
transparent: true,
|
||||
roughness: 32,
|
||||
transparent: false,
|
||||
roughness: 0,
|
||||
};
|
||||
oct_tree.set_cube(cube.clone());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue