From 54db162c1146dce7bf0abcd28864c8f6207c6a26 Mon Sep 17 00:00:00 2001 From: rodri Date: Thu, 18 Apr 2024 08:45:08 +0000 Subject: fix alpha channel value in the fragment shaders. --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index da0b71c..955cdf0 100644 --- a/main.c +++ b/main.c @@ -174,7 +174,7 @@ gouraudshader(FSparams *sp) else tc = Pt3(1,1,1,1); - c.a = fclamp(sp->v.c.a*tc.a, 0, 1); + c.a = 1; c.b = fclamp(sp->v.c.b*tc.b, 0, 1); c.g = fclamp(sp->v.c.g*tc.g, 0, 1); c.r = fclamp(sp->v.c.r*tc.r, 0, 1); @@ -261,7 +261,7 @@ phongshader(FSparams *sp) tc = Pt3(1,1,1,1); c = addpt3(ambient, addpt3(diffuse, specular)); - c.a = fclamp(c.a*tc.a, 0, 1); + c.a = 1; c.b = fclamp(c.b*tc.b, 0, 1); c.g = fclamp(c.g*tc.g, 0, 1); c.r = fclamp(c.r*tc.r, 0, 1); @@ -313,7 +313,7 @@ identshader(FSparams *sp) else tc = Pt3(1,1,1,1); - c.a = fclamp(sp->v.c.a*tc.a, 0, 1); + c.a = 1; c.b = fclamp(sp->v.c.b*tc.b, 0, 1); c.g = fclamp(sp->v.c.g*tc.g, 0, 1); c.r = fclamp(sp->v.c.r*tc.r, 0, 1); -- cgit v1.2.3