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

Vulkan fragment shader: ant texture cache spectrum scale chromatic. 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 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
float specHist (int i, float f)
 Evaluates specHist for this shader effect.
vec2 rot (vec2 p, float a)
 Evaluates rot for this shader effect.
float hash12 (vec2 p)
 Evaluates hash12 for this shader effect.
vec3 palette (float t, vec3 a, vec3 b, vec3 c, vec3 d)
 Evaluates palette for this shader effect.
vec2 styleDrift (vec2 uv, float layer, float age, float hB, float hM, float hT, float hA, vec3 oldest)
 Evaluates styleDrift for this shader effect.
vec3 styleColor (vec3 cached, float layer, float age, float hB, float hT)
 Evaluates styleColor 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 texture cache spectrum scale chromatic.

Definition in file ant_texture_cache_spectrum_scale_chromatic.frag.

Macro Definition Documentation

◆ 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 41 of file ant_texture_cache_spectrum_scale_chromatic.frag.

◆ history_head

#define history_head   int(ext.u3.x)

◆ 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 48 of file ant_texture_cache_spectrum_scale_chromatic.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

◆ time_f

#define time_f   ext.u2.y

Function Documentation

◆ hash12()

float hash12 ( vec2 p)

Evaluates hash12 for this shader effect.

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

Definition at line 91 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References hash12().

Referenced by blockShuffle(), compositeEffect(), compoundSample(), genSeed(), hash12(), hash12(), main(), main(), noiseGrain(), styleColor(), and styleDrift().

◆ 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_texture_cache_spectrum_scale_chromatic.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 151 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References amp_smooth, CACHE_HISTORY_LAYER, iResolution, main(), SIZE, specHist(), styleColor(), and styleDrift().

◆ palette()

vec3 palette ( float t,
vec3 a,
vec3 b,
vec3 c,
vec3 d )

Evaluates palette for this shader effect.

Parameters
tInput value for the calculation.
aInput value for the calculation.
bInput value for the calculation.
cInput value for the calculation.
dInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 106 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References palette(), and TAU.

◆ rot()

vec2 rot ( vec2 p,
float a )

Evaluates rot for this shader effect.

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

Definition at line 81 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References rot().

◆ 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 63 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References specHist(), and SPECTRUM_HISTORY_LAYER.

◆ styleColor()

vec3 styleColor ( vec3 cached,
float layer,
float age,
float hB,
float hT )

Evaluates styleColor for this shader effect.

Parameters
cachedInput value for the calculation.
layerInput value for the calculation.
ageInput value for the calculation.
hBInput value for the calculation.
hTInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 137 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References styleColor().

Referenced by main(), and styleColor().

◆ styleDrift()

vec2 styleDrift ( vec2 uv,
float layer,
float age,
float hB,
float hM,
float hT,
float hA,
vec3 oldest )

Evaluates styleDrift for this shader effect.

Parameters
uvInput value for the calculation.
layerInput value for the calculation.
ageInput value for the calculation.
hBInput value for the calculation.
hMInput value for the calculation.
hTInput value for the calculation.
hAInput value for the calculation.
oldestInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 123 of file ant_texture_cache_spectrum_scale_chromatic.frag.

References styleDrift().

Referenced by main(), and styleDrift().

Variable Documentation

◆ ext

ext

◆ TAU

const float TAU = 6.28318530718