Application prototype #14

Merged
glen merged 101 commits from app-proto into main 2024-10-21 23:38:28 +00:00
Showing only changes of commit 87763fc458 - Show all commits

View File

@ -166,10 +166,9 @@ fn main() {
// vector with respect to the coordinates of the impact
// point. i calculated it in my head and decided that
// the result looked good enough for now
vec3 normal_front = normalize(-v.sp + 2.*v.lt.s*pt);
vec3 normal = normalize(-v.sp + 2.*v.lt.s*pt);
vec3 color;
float incidence = dot(normal_front, light_dir);
float incidence = dot(normal, light_dir);
float illum = mix(0.4, 1.0, max(incidence, 0.0));
return taggedFrag(vec4(illum * base_color, opacity), -pt.z);
}