HitResult and Ray structs. random function.

This commit is contained in:
Piotrek
2021-04-24 23:33:33 +02:00
parent e390b6ed9b
commit 8585f21c70
5 changed files with 26 additions and 14 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ vec3 applyLighting(vec3 hitPoint, vec3 view, vec3 normal, uint brick)
vec3 ambient = light_color * 0.1;
vec3 diffuse = light_color * max(1.0-dot(normal, _SunDir), 0.0);
vec3 specular = light_color * pow(max(dot(view, reflect(-_SunDir, normal)), 0.0), 32);
vec3 specular = light_color * pow(max(dot(view, reflect(_SunDir, normal)), 0.0), 32);
// Combine colors
vec3 object_color = _Materials[brick-1].albedo.rgb;//vec3(0.0, 0.1, 0.5);