examples: add triangles scene

This scene showcases a transparent sphere.
This commit is contained in:
Bruno BELANYI 2020-03-19 16:46:55 +01:00
parent 552c0cb966
commit 27ac0ffe9f
1 changed files with 91 additions and 0 deletions

91
examples/triangles.yaml Normal file
View File

@ -0,0 +1,91 @@
# Optional field
reflection_limit: 5
camera:
origin: [0.0, 0.0, 0.0]
forward: [ 1.0, 0.0, 0.0]
up: [0.0, 1.0, 0.0]
fov: 90.0
distance_to_image: 1.0
x: 1080
y: 1080
lights:
directionals:
- direction: [0.5, 0.5, 0.5]
color: {r: 0.0, g: 0.5, b: 0.0}
- direction: [0.5, 0.5, -0.5]
color: {r: 0.0, g: 0.0, b: 0.5}
- direction: [0.7, -0.5, 0.0]
color: {r: 0.5, g: 0.0, b: 0.0}
objects:
- shape:
type: sphere
center: [5.0, -0.2, 0.2]
radius: 1.0
material:
type: uniform
diffuse:
r: 1.0
g: 1.0
b: 1.0
specular:
r: 1.0
g: 1.0
b: 1.0
transparency: 1.0
index: 1.9
texture:
type: uniform
color:
r: 1.0
g: 1.0
b: 1.0
- shape:
type: triangle
corners:
- [10., -10., -10.]
- [10., 10., 10.]
- [10., 10., -10.]
material:
type: uniform
diffuse:
r: 1.0
g: 1.0
b: 1.0
specular:
r: 1.0
g: 1.0
b: 1.0
texture:
type: uniform
color:
r: 1.0
g: 1.0
b: 0.0
- shape:
type: triangle
corners:
- [10., -10., -10.]
- [10., -10., 10.]
- [10., 10., 10.]
material:
type: uniform
diffuse:
r: 1.0
g: 1.0
b: 1.0
specular:
r: 1.0
g: 1.0
b: 1.0
texture:
type: uniform
color:
r: 0.5
g: 1.0
b: 0.5