SPIRV-Cross/reference/shaders/vulkan/frag/push-constant.vk.frag.vk
Hans-Kristian Arntzen e67f6f85a4 Defer parenthesis generation until needed.
Previously, we would generate parentheses proactively when generating
binary ops, however, this leads to uglier code and hits warnings in
compilers when used as a conditional.
2016-12-05 10:56:54 +01:00

19 lines
310 B
Plaintext

#version 310 es
precision mediump float;
precision highp int;
layout(push_constant, std430) uniform PushConstants
{
vec4 value0;
vec4 value1;
} push;
layout(location = 0) out vec4 FragColor;
layout(location = 0) in vec4 vColor;
void main()
{
FragColor = (vColor + push.value0) + push.value1;
}