Debian Codegraph @

shaders/toy.frag.template

raw
1 /*
2 * gulkan
3 * Copyright 2018 Collabora Ltd.
4 * Author: Lubosz Sarnecki <[email protected]>
5 * SPDX-License-Identifier: MIT
6 */
7
8 #version 460 core
9
10 layout (std140, set = 0, binding = 0) uniform block
11 {
12 uniform vec3 iResolution; // viewport resolution (in pixels)
13 uniform float iTime; // shader playback time (in seconds)
14 uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click
15 uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)
16 uniform float iTimeDelta; // render time (in seconds)
17 uniform int iFrame; // shader playback frame
18 uniform float iChannelTime[4]; // channel playback time (in seconds)
19 uniform vec4 iDate; // (year, month, day, time in seconds)
20 uniform float iSampleRate; // sound sample rate (i.e., 44100)
21 };
22
23 layout (location = 0) in vec2 in_uv;
24 layout (location = 0) out vec4 out_color;
25
26 void mainImage (out vec4 fragColor, in vec2 fragCoord);
27
28 void main ()
29 {
30 mainImage (out_color, in_uv * iResolution.xy);
31 }
32