Project for Computer Graphics
A really simple raytracer for spheres, cylinder and triangle impostors. You can check the GLSL Shader running in real-time here https://www.shadertoy.com/view/Xd2Xzc may be outdated.
Command line raytracing for a simple scene loader with YAML format (kind of)
Command:
raytrace -iescena1.txt -osalida -s640x480
Output: salidaXX.tga (XX per camera)
(check /FGC_T4/test.yml for reference)
Dependencies: GLFW 3.0.4, GLM Library, GLEW.
Scene Example:
---
tipo: Camara
posicion: 0 0 0
direccion: 0 0 -1
sombras: true
aliasing: false
---
tipo: Material
nombre: Azul1
difuso: 0.1 0.1 0.9
especular: 1.0 1.0 1.0
reflexion: 0.3
refracion: 0.0
transparencia: 0.0 # totalmente opaco
---
tipo: Material
nombre: Azul3
difuso: 0.1 0.1 0.9
especular: 1.0 1.0 1.0
reflexion: 0.3
refracion: 0.0
transparencia: 0.0 # totalmente opaco
---
tipo: Esfera
material: Azul1
centro: -1 1.2 -10
radio: 1.5
---
tipo: Cilindro
material: Verde3
centro: 0 -2
eje: Z
radio: 1
min: -2
max: 3
---
tipo: Triangulo
material: Rojo2
punto1: 4 5 6
punto2: -1.5 2 -3
punto3: 1.0 -1 -1
---
tipo: Luz
posicion: -5 -5 -5
color: 1 0 0.5
---
tipo: Cubo
material: Verde3
carasx: -1 1
carasy: -1 1
carasz: -2 -3