From 81188bee07725f22ff20be50855a4960d6049284 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Mon, 14 Aug 2017 16:10:26 +0000 Subject: [PATCH] fixed shading doesn't effect the alpha channel --- Src/Graphics/New3D/R3DShader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Graphics/New3D/R3DShader.cpp b/Src/Graphics/New3D/R3DShader.cpp index 0137104..928e28d 100644 --- a/Src/Graphics/New3D/R3DShader.cpp +++ b/Src/Graphics/New3D/R3DShader.cpp @@ -22,7 +22,7 @@ attribute vec3 inVertex; attribute vec3 inNormal; attribute vec2 inTexCoord; attribute vec4 inColour; -attribute vec4 inFixedShade; +attribute vec3 inFixedShade; // outputs to fragment shader varying float fsFogFactor; @@ -38,14 +38,14 @@ vec4 GetVertexColour() if(fixedShading) { if(hardwareStep==0x15) { if(!lightEnabled) { - polyColour += inFixedShade; // + vp ambient?? + polyColour.rgb += inFixedShade; // + vp ambient?? } else { - polyColour *= (inFixedShade + lighting[1].y); // fixed shade value + viewport ambient + polyColour.rgb *= (inFixedShade + lighting[1].y); // fixed shade value + viewport ambient } } else { - polyColour *= inFixedShade; //todo work out what ambient does. Probably a min clamp or 1-min clamp for signed values + polyColour.rgb *= inFixedShade; //todo work out what ambient does. Probably a min clamp or 1-min clamp for signed values } }