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

Vulkan fragment shader: ant cache spectrum8 fractal xor fold. More...

Go to the source code of this file.

Macros

#define amp_peak   ext.u2.w
#define amp_smooth   ext.u3.w
#define history_head   int(ext.u3.x)
#define iResolution   ext.u0.zw
#define iTime   ext.u0.y
#define spectrum_history_head   int(ext.audio_history.x)
#define spectrum_history_size   int(ext.audio_history.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
float specHist (int i, float f)
 Evaluates specHist for this shader effect.
vec4 cacheHist (int i, vec2 uv)
 Evaluates cacheHist for this shader effect.
vec3 palette (float t, vec3 d)
 Evaluates palette for this shader effect.
vec2 rot2 (vec2 p, float a)
 Evaluates rot2 for this shader effect.
vec2 fractalFold (vec2 p, float zoom, float t, int i)
 Evaluates fractalFold for this shader effect.
vec3 xorBlend (vec3 a, vec3 b)
 Evaluates xorBlend for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: ant cache spectrum8 fractal xor fold.

Definition in file ant_cache_spectrum8_fractal_xor_fold.frag.

Macro Definition Documentation

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 13 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 14 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ CACHE_HISTORY_LAYER

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

Definition at line 37 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ history_head

#define history_head   int(ext.u3.x)

Definition at line 15 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 16 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ iTime

#define iTime   ext.u0.y

Definition at line 17 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ SIZE

#define SIZE   8

Definition at line 34 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

Definition at line 18 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ SPECTRUM_HISTORY_LAYER

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

Definition at line 44 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

Definition at line 19 of file ant_cache_spectrum8_fractal_xor_fold.frag.

Function Documentation

◆ cacheHist()

vec4 cacheHist ( int i,
vec2 uv )

Evaluates cacheHist for this shader effect.

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

Definition at line 76 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References CACHE_HISTORY_LAYER, and cacheHist().

◆ fractalFold()

vec2 fractalFold ( vec2 p,
float zoom,
float t,
int i )

Evaluates fractalFold for this shader effect.

Parameters
pInput value for the calculation.
zoomInput value for the calculation.
tInput value for the calculation.
iInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 117 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References fractalFold(), and rot2().

Referenced by fractalFold(), fractalFold(), fractalFold(), fractalFold(), fractalFold(), fractalFold(), fractalFold(), generate_live_frame(), main(), 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 ant_cache_spectrum8_fractal_xor_fold.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 141 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References amp_peak, cacheHist(), fractalFold(), h(), h2(), iResolution, iTime, main(), palette(), specHist(), and xorBlend().

◆ palette()

vec3 palette ( float t,
vec3 d )

Evaluates palette for this shader effect.

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

Definition at line 94 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References palette(), and TAU.

◆ rot2()

vec2 rot2 ( vec2 p,
float a )

Evaluates rot2 for this shader effect.

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

Definition at line 104 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References rot2().

Referenced by fractalFold(), main(), main(), rot2(), rot2(), rot2(), rot2(), and twirl().

◆ specHist()

float specHist ( int i,
float f )

Evaluates specHist for this shader effect.

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

Definition at line 59 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References specHist(), and SPECTRUM_HISTORY_LAYER.

◆ xorBlend()

vec3 xorBlend ( vec3 a,
vec3 b )

Evaluates xorBlend for this shader effect.

Parameters
aInput value for the calculation.
bInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 131 of file ant_cache_spectrum8_fractal_xor_fold.frag.

References xorBlend().

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

Variable Documentation

◆ ext

ext

Definition at line 12 of file ant_cache_spectrum8_fractal_xor_fold.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 51 of file ant_cache_spectrum8_fractal_xor_fold.frag.