Assorted bug fixes.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-20 12:13:42 -04:00
parent 33aba8cae2
commit 5970be923b
9 changed files with 314 additions and 270 deletions

124
scenes/scene1.json Normal file
View File

@@ -0,0 +1,124 @@
{
"directional_light": {
"direction": [1.0, 1.0, 1.0],
"diffuse": [0.0, 1.0, 1.0]
},
"directional_light": {
"direction": [-1.0, 1.0, 1.0],
"diffuse": [1.0, 1.0, 0.0]
},
"directional_light": {
"direction": [0.0, 1.0, -1.0],
"diffuse": [1.0, 0.0, 1.0]
},
"disk": {
"position": [-0.0, -0.0, -0.5],
"normal": [0.0, 0.0, 0.1],
"radius": 0.25,
"material": {
"diffuse": [1.0, 0.0, 0.0],
"rho": 0.3,
"transmissive": true,
"ref_index": 1.33
}
},
"plane": {
"point": [0.0, -1.5, 0.0],
"normal": [0.0, 1.0, 0.0],
"material": {
"diffuse": [1.0, 0.5, 0.4]
}
},
"sphere": {
"position": [1.0, 1.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [1.0, 0.0, 0.0]
}
},
"sphere": {
"position": [-1.0, 1.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [0.0, 1.0, 0.0]
}
},
"sphere": {
"position": [1.0, -1.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [0.0, 0.0, 1.0]
}
},
"sphere": {
"position": [-1.0, -1.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [1.0, 0.0, 1.0]
}
},
"sphere": {
"position": [0.0, 0.0, -2.0],
"radius": 1.0,
"material": {
"diffuse": [1.0, 1.0, 0.0]
}
},
"sphere": {
"position": [-1.5, 0.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [1.0, 1.0, 1.0],
"rho": 0.3
}
},
"sphere": {
"position": [1.5, 0.0, -2.0],
"radius": 0.5,
"material": {
"diffuse": [1.0, 1.0, 1.0],
"rho": 0.08,
"transmissive": true,
"ref_index": 1.1
}
},
"sphere": {
"position": [0.0, 1.5, -2.0],
"radius": 0.5,
"material": {
"diffuse": [1.0, 1.0, 1.0],
"rho": 0.5
}
},
"sphere": {
"position": [0.0, 0.0, -1.0],
"radius": 0.25,
"material": {
"diffuse": [1.0, 1.0, 1.0],
"rho": 0.1
}
},
"environment": {
"color": [0.7, 0.4, 0.05]
},
"camera": {
"eye": [0.0, 0.0, 1.0],
"look": [0.0, 0.0, -1.0],
"up": [0.0, 1.0, 0.0]
}
}

View File

@@ -1,5 +1,5 @@
{
"point_light":{
"point_light": {
"position": [0.0, 0.9, -1.0]
},
@@ -12,7 +12,7 @@
}
},
"sphere":{
"sphere": {
"position": [-0.5, -0.5, -1.5],
"radius": 0.5,
"material": {
@@ -21,7 +21,7 @@
}
},
"sphere":{
"sphere": {
"position": [-0.5, -0.5, 0.6],
"radius": 0.5,
"material": {