Delete code, adjust example to operator overload errors

This commit is contained in:
Krzosa Karol
2022-09-29 17:05:45 +02:00
parent 5cb5f12cda
commit 66b2be3550
4 changed files with 12 additions and 37 deletions

View File

@@ -23,7 +23,7 @@ Raymarcher_Update :: ()
diffuse_color := Vec3{0.7,0.2,0.2}
specular_color := Vec3{1,1,1}
eye := Vec3{0, 0, 2}
light_intensity :: 1.2
light_intensity :: 1.2->F32
Xf := 1 / X->F32
Yf := 1 / Y->F32
@@ -61,17 +61,17 @@ Raymarcher_Update :: ()
eye_to_point := Vec3_Normalize(eye - p)
reflected_light := Vec3_Normalize(Vec3_Reflect(Vec3_Negate(light_to_point), normal))
ambient :: 0.2
ambient :: 0.2->F32
diffuse := Vec3_Dot(normal, light_to_point)
color := ambient_color*ambient
color := ambient_color*ambient->F32
if diffuse > Epsilon
color = color + diffuse_color*diffuse
specular := Vec3_Dot(reflected_light, eye_to_point)
if specular > Epsilon
specular = specular*specular*specular*specular
color = color + specular_color*specular*0.2
color = color + specular_color*specular*0.2->F32
color = color * light_intensity
// Gamma correction