ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
rainbow-code-diamond-wave.frag File Reference

Vulkan fragment shader: rainbow-code-diamond-wave. More...

Go to the source code of this file.

Macros

#define amp_high   ext.audio_bands.z
#define amp_low   ext.audio_bands.x
#define amp_mid   ext.audio_bands.y
#define amp_peak   ext.u2.w
#define amp_rms   ext.u3.z
#define amp_smooth   ext.u3.w
#define iResolution   ext.u0.zw
#define iamp   ext.u1.z
#define time_f   ext.u2.y

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (location=0) in vec2 tc
 layout (set=0, binding=0) uniform sampler2D samp
mat2 rot (float a)
 Evaluates rot for this shader effect.
vec2 mirrorUV (vec2 p)
 Evaluates mirrorUV for this shader effect.
vec3 spectral (float x)
 Evaluates spectral for this shader effect.
vec3 aces (vec3 x)
 Evaluates aces for this shader effect.
float diamonds (vec2 p)
 Evaluates diamonds for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: rainbow-code-diamond-wave.

Definition in file rainbow-code-diamond-wave.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 13 of file rainbow-code-diamond-wave.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 14 of file rainbow-code-diamond-wave.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 15 of file rainbow-code-diamond-wave.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 16 of file rainbow-code-diamond-wave.frag.

◆ amp_rms

#define amp_rms   ext.u3.z

Definition at line 17 of file rainbow-code-diamond-wave.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 18 of file rainbow-code-diamond-wave.frag.

◆ iamp

#define iamp   ext.u1.z

Definition at line 20 of file rainbow-code-diamond-wave.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 19 of file rainbow-code-diamond-wave.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 21 of file rainbow-code-diamond-wave.frag.

Function Documentation

◆ aces()

vec3 aces ( vec3 x)

Evaluates aces for this shader effect.

Parameters
xInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 73 of file rainbow-code-diamond-wave.frag.

References aces().

◆ diamonds()

float diamonds ( vec2 p)

Evaluates diamonds for this shader effect.

Parameters
pInput value for the calculation.
Returns
Computed float value.

Definition at line 82 of file rainbow-code-diamond-wave.frag.

References cell(), diamonds(), rot(), time_f, and wave().

Referenced by diamonds(), and main().

◆ layout() [1/3]

layout ( location = 0)

References layout().

◆ layout() [2/3]

layout ( set = 0,
binding = 0 )

References layout().

◆ layout() [3/3]

layout ( set = 0,
binding = 1,
std140  )

Definition at line 3 of file rainbow-code-diamond-wave.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 93 of file rainbow-code-diamond-wave.frag.

References aces(), amp_high, amp_low, amp_mid, amp_peak, amp_smooth, diamonds(), gem(), h(), iResolution, main(), mirrorUV(), n(), s2(), spectral(), and time_f.

◆ mirrorUV()

vec2 mirrorUV ( vec2 p)

Evaluates mirrorUV for this shader effect.

Parameters
pInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 57 of file rainbow-code-diamond-wave.frag.

References mirrorUV().

◆ rot()

mat2 rot ( float a)

Evaluates rot for this shader effect.

Parameters
aInput value for the calculation.
Returns
Computed mat2 value.

Definition at line 48 of file rainbow-code-diamond-wave.frag.

References rot().

◆ spectral()

vec3 spectral ( float x)

Evaluates spectral for this shader effect.

Parameters
xInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 65 of file rainbow-code-diamond-wave.frag.

References spectral(), and TAU.

Variable Documentation

◆ ext

ext

Definition at line 12 of file rainbow-code-diamond-wave.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 42 of file rainbow-code-diamond-wave.frag.