ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
mirror-code-x-checker-grid.frag
Go to the documentation of this file.
1#version 450
2
3/**
4 * @file mirror-code-x-checker-grid.frag
5 * @brief Vulkan fragment shader: mirror-code-x-checker-grid.
6 */
7layout(set = 0, binding = 1, std140) uniform SpriteExtended {
8 vec4 mouse;
9 vec4 u0;
10 vec4 u1;
11 vec4 u2;
12 vec4 u3;
13 vec4 custom_uniforms[16];
14 vec4 audio_bands;
15 vec4 audio_history;
17
18layout(location = 0) in vec2 tc;
19layout(location = 0) out vec4 color;
20layout(set = 0, binding = 0) uniform sampler2D samp;
21
22/**
23 * @brief Evaluates mirrorRepeat for this shader effect.
24 * @param value Input value for the calculation.
25 * @return Computed vec2 value.
26 */
27vec2 mirrorRepeat(vec2 value) {
28 return 1.0 - abs(mod(value, 2.0) - 1.0);
29}
30
31/**
32 * @brief Executes the fragment shader entry point.
33 */
34void main() {
35 vec2 uv = mirrorRepeat(tc * vec2(6.0, 4.0));
36 color = texture(samp, uv);
37}
layout(set=0, binding=1, std140) uniform SpriteExtended
Definition 3high.frag:7
ext
Definition 3high.frag:16
void main(void)
Executes the fragment shader entry point.
Definition 3high.frag:47
vec2 mirrorRepeat(vec2 value)
Evaluates mirrorRepeat for this shader effect.