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

Vulkan fragment shader: color peak cache chrono-crystalline-resonator. 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
float hash21 (vec2 p)
 Evaluates hash21 for this shader effect.
float noise21 (vec2 p)
 Evaluates noise21 for this shader effect.
float fbm (vec2 p)
 Evaluates fbm for this shader effect.
vec2 repeatMirror (vec2 p)
 Evaluates repeatMirror for this shader effect.
vec3 acid (float t)
 Evaluates acid 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 heightField (vec2 p, vec2 effectOrigin, float bass, float mid)
 Evaluates heightField for this shader effect.
vec3 normalAt (vec2 p, float e, vec2 origin, float bass, float mid)
 Evaluates normalAt for this shader effect.
vec3 metalLight (vec3 base, vec3 n, vec2 p, float rough)
 Evaluates metalLight for this shader effect.
vec4 sampleCache (int idx, vec2 uv)
 Evaluates sampleCache for this shader effect.
float sampleSpectrumHistory (int idx, float freq)
 Evaluates sampleSpectrumHistory for this shader effect.
void main (void)
 Executes the fragment shader entry point.

Variables

 ext
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: color peak cache chrono-crystalline-resonator.

Definition in file color_peak_cache_chrono-crystalline-resonator.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 43 of file color_peak_cache_chrono-crystalline-resonator.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 52 of file color_peak_cache_chrono-crystalline-resonator.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

◆ time_f

#define time_f   ext.u2.y

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 142 of file color_peak_cache_chrono-crystalline-resonator.frag.

References aces().

◆ acid()

vec3 acid ( float t)

Evaluates acid for this shader effect.

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

Definition at line 120 of file color_peak_cache_chrono-crystalline-resonator.frag.

References acid(), and TAU.

◆ fbm()

float fbm ( vec2 p)

Evaluates fbm for this shader effect.

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

Definition at line 94 of file color_peak_cache_chrono-crystalline-resonator.frag.

References fbm(), and noise21().

◆ hash21()

float hash21 ( vec2 p)

Evaluates hash21 for this shader effect.

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

Definition at line 73 of file color_peak_cache_chrono-crystalline-resonator.frag.

References hash21().

◆ heightField()

float heightField ( vec2 p,
vec2 effectOrigin,
float bass,
float mid )

Evaluates heightField for this shader effect.

Parameters
pInput value for the calculation.
effectOriginInput value for the calculation.
bassInput value for the calculation.
midInput value for the calculation.
Returns
Computed float value.

Definition at line 155 of file color_peak_cache_chrono-crystalline-resonator.frag.

References amp_high, fbm(), heightField(), time_f, and wave().

Referenced by heightField(), heightField(), main(), normalAt(), normalAt(), and surfaceNormal().

◆ 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_chrono-crystalline-resonator.frag.

References layout().

◆ main()

◆ metalLight()

vec3 metalLight ( vec3 base,
vec3 n,
vec2 p,
float rough )

Evaluates metalLight for this shader effect.

Parameters
baseInput value for the calculation.
nInput value for the calculation.
pInput value for the calculation.
roughInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 202 of file color_peak_cache_chrono-crystalline-resonator.frag.

References metalLight(), n(), spectral(), and time_f.

Referenced by main(), and metalLight().

◆ noise21()

float noise21 ( vec2 p)

Evaluates noise21 for this shader effect.

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

Definition at line 82 of file color_peak_cache_chrono-crystalline-resonator.frag.

References hash21(), and noise21().

◆ normalAt()

vec3 normalAt ( vec2 p,
float e,
vec2 origin,
float bass,
float mid )

Evaluates normalAt for this shader effect.

Parameters
pInput value for the calculation.
eInput value for the calculation.
originInput value for the calculation.
bassInput value for the calculation.
midInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 187 of file color_peak_cache_chrono-crystalline-resonator.frag.

References h(), heightField(), and normalAt().

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

◆ repeatMirror()

vec2 repeatMirror ( vec2 p)

Evaluates repeatMirror for this shader effect.

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

Definition at line 110 of file color_peak_cache_chrono-crystalline-resonator.frag.

References repeatMirror().

Referenced by main(), and repeatMirror().

◆ sampleCache()

vec4 sampleCache ( int idx,
vec2 uv )

Evaluates sampleCache for this shader effect.

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

Definition at line 227 of file color_peak_cache_chrono-crystalline-resonator.frag.

References CACHE_HISTORY_LAYER, and sampleCache().

◆ sampleSpectrumHistory()

float sampleSpectrumHistory ( int idx,
float freq )

Evaluates sampleSpectrumHistory for this shader effect.

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

Definition at line 244 of file color_peak_cache_chrono-crystalline-resonator.frag.

References sampleSpectrumHistory(), and SPECTRUM_HISTORY_LAYER.

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

◆ spectral()

vec3 spectral ( float x)

Evaluates spectral for this shader effect.

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

Definition at line 133 of file color_peak_cache_chrono-crystalline-resonator.frag.

References spectral(), and TAU.

Variable Documentation

◆ ext

ext

◆ TAU

const float TAU = 6.28318530718