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;