~ | map changing

This commit is contained in:
TheRedShip
2025-01-03 16:48:57 +01:00
parent d25db020bf
commit 05387337cf
3 changed files with 36 additions and 26 deletions

27
scenes/cornell.rt Normal file
View File

@ -0,0 +1,27 @@
MAT 255 255 255 0.0 0.0 0.0
MAT 255 255 255 5.0 0.0 0.0
MAT 255 100 100 0.0 0.0 0.0
MAT 100 100 255 0.0 0.0 0.0
MAT 100 255 100 0.0 0.0 0.0
MAT 255 255 255 0.0 0.98 0.0
sp 0 -1 0 1 5
sp 0 -2 -1 2 2
sp -1 -2 0.8 2 3
sp 1 -2 0.8 2 4
qu -1 2.9 -1 2 0 0 0 0 2 1
pl 0 3 0 0 -1 0 5
pl 0 -3 0 0 1 0 5
pl 3 0 0 -1 0 0 3
pl -3 0 0 1 0 0 2
pl 0 0 -3 0 0 1 0
pl 0 0 3 0 0 -1 0
R 1.0 -2.0 10

View File

@ -1,27 +1,10 @@
MAT 255 255 255 0.0 0.0 0.0
MAT 255 255 255 5.0 0.0 0.0
MAT 255 100 100 0.0 0.0 0.0
MAT 100 100 255 0.0 0.0 0.0
MAT 100 255 100 0.0 0.0 0.0
MAT 255 255 255 0.0 1.0 0.0
sp 0 -1 0 1 5
sp 0 -2 -1 2 2
sp -1 -2 0.8 2 3
sp 1 -2 0.8 2 4
qu -1.5 2.9 -1.5 3 0 0 0 0 3 1
pl 0 3 0 0 -1 0 5
pl 0 -3 0 0 1 0 0
pl 3 0 0 -1 0 0 3
pl -3 0 0 1 0 0 2
pl 0 0 -3 0 0 1 0
pl 0 0 3 0 0 -1 0
MAT 255 255 255 0.0 0.0 0.0 //white
MAT 255 100 100 0.0 0.0 0.0 //red
MAT 255 255 255 5.0 0.0 0.0 //sun
R 1.0 -2.0 10
pl 0 -1 0 0 1 0 0
cu 0 1 -3 1 1 1
sp 15 30 -30 30 2

View File

@ -97,7 +97,7 @@ vec3 pathtrace(Ray ray, vec2 uv)
float closest_t = 1e30;
for (int i = 0; i < 4; i++)
for (int i = 0; i < 10; i++)
{
hitInfo hit = traceRay(ray);
if (hit.obj_index == -1)