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

Vulkan fragment shader: color peak cache-code-ferrofluid ripple cathedral. 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_smooth   ext.u3.w
#define history_head   int(ext.u3.x)
#define iMouse   ext.mouse
#define iResolution   ext.u0.zw
#define spectrum_history_head   int(ext.audio_history.x)
#define spectrum_history_size   int(ext.audio_history.y)
#define time_f   ext.u2.y
#define SIZE   8
#define CACHE_HISTORY_LAYER(index)
#define SPECTRUM_HISTORY_LAYER(index)

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (location=0) in vec2 tc
 layout (set=0, binding=0) uniform sampler2D samp
vec2 mirrorUV (vec2 u)
 Evaluates mirrorUV for this shader effect.
mat2 rot (float a)
 Evaluates rot for this shader effect.
vec3 pal (float x)
 Evaluates pal for this shader effect.
vec3 tone (vec3 x)
 Evaluates tone for this shader effect.
float hash (vec2 p)
 Evaluates hash for this shader effect.
float noise (vec2 p)
 Evaluates noise for this shader effect.
vec4 cache (int i, vec2 u)
 Evaluates cache for this shader effect.
float hist (int i, float f)
 Evaluates hist for this shader effect.
float field (vec2 p, vec2 o, float b, float m)
 Evaluates field for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: color peak cache-code-ferrofluid ripple cathedral.

Definition in file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

◆ amp_low

#define amp_low   ext.audio_bands.x

◆ amp_mid

#define amp_mid   ext.audio_bands.y

◆ amp_peak

#define amp_peak   ext.u2.w

◆ amp_smooth

#define amp_smooth   ext.u3.w

◆ CACHE_HISTORY_LAYER

#define CACHE_HISTORY_LAYER ( index)
Value:
((history_head + (index)) % SIZE)
#define history_head
#define SIZE

Definition at line 39 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

◆ history_head

#define history_head   int(ext.u3.x)

◆ iMouse

#define iMouse   ext.mouse

◆ iResolution

#define iResolution   ext.u0.zw

◆ SIZE

#define SIZE   8

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

◆ SPECTRUM_HISTORY_LAYER

#define SPECTRUM_HISTORY_LAYER ( index)
Value:
#define spectrum_history_head
#define spectrum_history_size

Definition at line 46 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

◆ time_f

#define time_f   ext.u2.y

Function Documentation

◆ cache()

vec4 cache ( int i,
vec2 u )

Evaluates cache for this shader effect.

Parameters
iInput value for the calculation.
uInput value for the calculation.
Returns
Computed vec4 value.

Definition at line 111 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References cache(), and CACHE_HISTORY_LAYER.

Referenced by cache(), and main().

◆ field()

float field ( vec2 p,
vec2 o,
float b,
float m )

Evaluates field for this shader effect.

Parameters
pInput value for the calculation.
oInput value for the calculation.
bInput value for the calculation.
mInput value for the calculation.
Returns
Computed float value.

Definition at line 157 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References amp_high, field(), noise(), s2(), and time_f.

◆ hash()

float hash ( vec2 p)

Evaluates hash for this shader effect.

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

Definition at line 91 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References hash().

◆ hist()

float hist ( int i,
float f )

Evaluates hist for this shader effect.

Parameters
iInput value for the calculation.
fInput value for the calculation.
Returns
Computed float value.

Definition at line 134 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References hist(), and SPECTRUM_HISTORY_LAYER.

Referenced by hist(), 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 7 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 172 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References amp_high, amp_low, amp_peak, amp_smooth, cache(), field(), h(), hist(), iMouse, iResolution, main(), mirrorUV(), n(), pal(), rot(), spec(), time_f, and tone().

◆ mirrorUV()

vec2 mirrorUV ( vec2 u)

Evaluates mirrorUV for this shader effect.

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

Definition at line 58 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References mirrorUV().

◆ noise()

float noise ( vec2 p)

Evaluates noise for this shader effect.

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

Definition at line 99 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References hash(), and noise().

◆ pal()

vec3 pal ( float x)

Evaluates pal for this shader effect.

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

Definition at line 75 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References pal(), and TAU.

◆ rot()

mat2 rot ( float a)

Evaluates rot for this shader effect.

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

Definition at line 66 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References rot().

◆ tone()

vec3 tone ( vec3 x)

Evaluates tone for this shader effect.

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

Definition at line 83 of file color_peak_cache-code-ferrofluid_ripple_cathedral.frag.

References tone().

Referenced by main(), main(), and tone().

Variable Documentation

◆ ext

◆ TAU

const float TAU = 6.28318530718