20 lines
380 B
GLSL
20 lines
380 B
GLSL
#version 450
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
|
|
layout(location = 0) out vec4 outColor;
|
|
|
|
layout(binding = 1) uniform Shading
|
|
{
|
|
vec4 color;
|
|
bool preMultiply;
|
|
} shading;
|
|
|
|
layout(binding = 1) uniform sampler2D render;
|
|
|
|
void main()
|
|
{
|
|
outColor = shading.color;
|
|
|
|
if (shading.preMultiply)
|
|
outColor = vec4(outColor.rgb * outColor.a, outColor.a);
|
|
} |