summaryrefslogtreecommitdiff
path: root/res/shaders/simple_shader.frag
blob: a4e2b7ee72f103ae86ffc3b18e157c50e8b9cc31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#version 450

layout (location = 0) in vec3 fragColor;
layout (location = 1) in vec2 fragUv;

layout (location = 0) out vec4 outColor;

layout (binding = 0) uniform GlobalUbo {
  mat4 projectionViewMatrix;
  vec3 directionToLight;
} ubo;

layout (binding = 2) uniform Deez {
  mat4 projectionViewMatrix;
  vec3 directionToLight;
} deez;

layout (binding = 1) uniform sampler2D texSampler;

layout(push_constant) uniform Push {
  mat4 transform;
  mat4 normalMatrix;
} push;

void main() {
  outColor = mix(texture(texSampler, fragUv), vec4(fragColor, 1.0), .5);
}