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

Vulkan fragment shader: frac shader02 dmd6i spectrum16. 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 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 SPECTRUM_HISTORY_LAYER(index)

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (location=0) out vec4 color
 layout (set=0, binding=0) uniform sampler2D samp
float sample16 (int index, float freq)
 Evaluates sample16 for this shader effect.
float pingPong (float x, float length)
 Evaluates pingPong for this shader effect.
vec2 rotateUV (vec2 uv, float angle, vec2 c, float aspect)
 Evaluates rotateUV for this shader effect.
vec2 reflectUV (vec2 uv, float segments, vec2 c, float aspect)
 Evaluates reflectUV for this shader effect.
vec2 fractalFold (vec2 uv, float zoom, float t, float histPhase, vec2 c, float aspect)
 Evaluates fractalFold for this shader effect.
vec3 neonPalette (float t)
 Evaluates neonPalette for this shader effect.
float hash1 (float n)
 Evaluates hash1 for this shader effect.
vec2 diamondFold (vec2 uv, vec2 c, float aspect)
 Evaluates diamondFold for this shader effect.
vec2 continuousUv (vec2 pwrap, vec2 ar, vec2 center)
 Evaluates continuousUv for this shader effect.
void main (void)
 Executes the fragment shader entry point.

Variables

 ext
const float PI = 3.14159265358979323846

Detailed Description

Vulkan fragment shader: frac shader02 dmd6i spectrum16.

Definition in file frac_shader02_dmd6i_spectrum16.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 17 of file frac_shader02_dmd6i_spectrum16.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 18 of file frac_shader02_dmd6i_spectrum16.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 19 of file frac_shader02_dmd6i_spectrum16.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 20 of file frac_shader02_dmd6i_spectrum16.frag.

◆ amp_rms

#define amp_rms   ext.u3.z

Definition at line 21 of file frac_shader02_dmd6i_spectrum16.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 22 of file frac_shader02_dmd6i_spectrum16.frag.

◆ iMouse

#define iMouse   ext.mouse

Definition at line 23 of file frac_shader02_dmd6i_spectrum16.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 24 of file frac_shader02_dmd6i_spectrum16.frag.

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

Definition at line 25 of file frac_shader02_dmd6i_spectrum16.frag.

◆ SPECTRUM_HISTORY_LAYER

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

Definition at line 51 of file frac_shader02_dmd6i_spectrum16.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

Definition at line 26 of file frac_shader02_dmd6i_spectrum16.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 27 of file frac_shader02_dmd6i_spectrum16.frag.

Function Documentation

◆ continuousUv()

vec2 continuousUv ( vec2 pwrap,
vec2 ar,
vec2 center )

Evaluates continuousUv for this shader effect.

Parameters
pwrapInput value for the calculation.
arInput value for the calculation.
centerInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 212 of file frac_shader02_dmd6i_spectrum16.frag.

References continuousUv(), and n().

Referenced by continuousUv(), and main().

◆ diamondFold()

vec2 diamondFold ( vec2 uv,
vec2 c,
float aspect )

Evaluates diamondFold for this shader effect.

Parameters
uvInput value for the calculation.
cInput value for the calculation.
aspectInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 194 of file frac_shader02_dmd6i_spectrum16.frag.

References diamondFold().

◆ fractalFold()

vec2 fractalFold ( vec2 uv,
float zoom,
float t,
float histPhase,
vec2 c,
float aspect )

Evaluates fractalFold for this shader effect.

Parameters
uvInput value for the calculation.
zoomInput value for the calculation.
tInput value for the calculation.
histPhaseInput value for the calculation.
cInput value for the calculation.
aspectInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 146 of file frac_shader02_dmd6i_spectrum16.frag.

References fractalFold(), rotateUV(), and sample16().

◆ hash1()

float hash1 ( float n)

Evaluates hash1 for this shader effect.

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

Definition at line 183 of file frac_shader02_dmd6i_spectrum16.frag.

References hash1(), and n().

Referenced by hash1(), hash1(), main(), main(), and sitePos().

◆ layout() [1/3]

layout ( location = 0)

References layout().

◆ layout() [2/3]

layout ( set = 0,
binding = 0 )

References layout(), and spectrum().

◆ layout() [3/3]

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

Definition at line 7 of file frac_shader02_dmd6i_spectrum16.frag.

References layout().

◆ main()

void main ( void )

◆ neonPalette()

vec3 neonPalette ( float t)

Evaluates neonPalette for this shader effect.

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

Definition at line 167 of file frac_shader02_dmd6i_spectrum16.frag.

References neonPalette().

◆ pingPong()

float pingPong ( float x,
float length )

Evaluates pingPong for this shader effect.

Parameters
xInput value for the calculation.
lengthInput value for the calculation.
Returns
Computed float value.

Definition at line 90 of file frac_shader02_dmd6i_spectrum16.frag.

References pingPong().

◆ reflectUV()

vec2 reflectUV ( vec2 uv,
float segments,
vec2 c,
float aspect )

Evaluates reflectUV for this shader effect.

Parameters
uvInput value for the calculation.
segmentsInput value for the calculation.
cInput value for the calculation.
aspectInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 120 of file frac_shader02_dmd6i_spectrum16.frag.

References reflectUV().

◆ rotateUV()

vec2 rotateUV ( vec2 uv,
float angle,
vec2 c,
float aspect )

Evaluates rotateUV for this shader effect.

Parameters
uvInput value for the calculation.
angleInput value for the calculation.
cInput value for the calculation.
aspectInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 103 of file frac_shader02_dmd6i_spectrum16.frag.

References rotateUV().

◆ sample16()

float sample16 ( int index,
float freq )

Evaluates sample16 for this shader effect.

Parameters
indexInput value for the calculation.
freqInput value for the calculation.
Returns
Computed float value.

Definition at line 63 of file frac_shader02_dmd6i_spectrum16.frag.

References sample16(), and SPECTRUM_HISTORY_LAYER.

Referenced by fractalFold(), main(), and sample16().

Variable Documentation

◆ ext

ext

Definition at line 16 of file frac_shader02_dmd6i_spectrum16.frag.

◆ PI

const float PI = 3.14159265358979323846

Definition at line 54 of file frac_shader02_dmd6i_spectrum16.frag.