From dfcaad67070bd8c34000de101ebebe5f2c553e6f Mon Sep 17 00:00:00 2001 From: "R.E. Kovalev" Date: Thu, 15 Jun 2023 14:45:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A8=D0=B5=D0=B9=D0=B4=D0=B5=D1=80=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=BC=D0=BF=D0=BE=D1=87=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shaders/bulb.frag | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/shaders/bulb.frag b/shaders/bulb.frag index 2f8fef3..97f9259 100644 --- a/shaders/bulb.frag +++ b/shaders/bulb.frag @@ -2,10 +2,11 @@ layout(std140, binding = 1) uniform Material { - vec3 ka; - vec3 kd; - vec3 ks; - float p; + vec3 base_color; + float roughness; + float metallic; + float specular; + vec3 emitted; bool normalmapped; bool parallaxmapped; bool displacementmapped; @@ -19,8 +20,8 @@ layout(std140, binding = 4) uniform gamma }; layout (location = 1) out vec3 gNormal; -layout (location = 3) out vec4 gAmbientSpecular; layout (location = 4) out uvec3 gID; +layout (location = 5) out vec3 gEmittedColor; uniform float angle; uniform vec3 direction; @@ -31,7 +32,7 @@ void main() { float cosA = dot(normalize(pos_local), normalize(direction)); if (degrees(acos(cosA)) <= angle) - gAmbientSpecular.rgb = pow(ka, vec3(inv_gamma)); + gEmittedColor = pow(base_color, vec3(inv_gamma)); else discard;