ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
trail-cache-code-orbital-rings.frag File Reference

Vulkan fragment shader: trail-cache-code-orbital-rings. 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 EFFECT_ID   38
#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
mat2 rotate_2d (float angle)
 Evaluates rotate 2d for this shader effect.
vec2 mirror_repeat (vec2 point)
 Evaluates mirror repeat for this shader effect.
vec3 palette (float phase)
 Evaluates palette for this shader effect.
vec4 sample_cache (int index, vec2 uv)
 Evaluates sample cache for this shader effect.
float sample_history (int index, float frequency)
 Evaluates sample history for this shader effect.
vec2 orbital_warp (vec2 uv, vec2 center, float depth, float bass, float middle)
 Evaluates orbital warp for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: trail-cache-code-orbital-rings.

Definition in file trail-cache-code-orbital-rings.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 17 of file trail-cache-code-orbital-rings.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 18 of file trail-cache-code-orbital-rings.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 19 of file trail-cache-code-orbital-rings.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 20 of file trail-cache-code-orbital-rings.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 21 of file trail-cache-code-orbital-rings.frag.

◆ CACHE_HISTORY_LAYER

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

Definition at line 40 of file trail-cache-code-orbital-rings.frag.

◆ EFFECT_ID

#define EFFECT_ID   38

Definition at line 30 of file trail-cache-code-orbital-rings.frag.

◆ history_head

#define history_head   int(ext.u3.x)

Definition at line 22 of file trail-cache-code-orbital-rings.frag.

◆ iMouse

#define iMouse   ext.mouse

Definition at line 23 of file trail-cache-code-orbital-rings.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 24 of file trail-cache-code-orbital-rings.frag.

◆ SIZE

#define SIZE   8

Definition at line 37 of file trail-cache-code-orbital-rings.frag.

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

Definition at line 25 of file trail-cache-code-orbital-rings.frag.

◆ SPECTRUM_HISTORY_LAYER

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

Definition at line 47 of file trail-cache-code-orbital-rings.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

Definition at line 26 of file trail-cache-code-orbital-rings.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 27 of file trail-cache-code-orbital-rings.frag.

Function Documentation

◆ 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 trail-cache-code-orbital-rings.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 134 of file trail-cache-code-orbital-rings.frag.

References amp_peak, amp_smooth, iMouse, iResolution, main(), orbital_warp(), palette(), sample_cache(), sample_history(), and SIZE.

◆ mirror_repeat()

vec2 mirror_repeat ( vec2 point)

Evaluates mirror repeat for this shader effect.

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

Definition at line 76 of file trail-cache-code-orbital-rings.frag.

References mirror_repeat().

◆ orbital_warp()

vec2 orbital_warp ( vec2 uv,
vec2 center,
float depth,
float bass,
float middle )

Evaluates orbital warp for this shader effect.

Parameters
uvInput value for the calculation.
centerInput value for the calculation.
depthInput value for the calculation.
bassInput value for the calculation.
middleInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 120 of file trail-cache-code-orbital-rings.frag.

References orbital_warp(), rotate_2d(), TAU, and time_f.

Referenced by main(), and orbital_warp().

◆ palette()

vec3 palette ( float phase)

Evaluates palette for this shader effect.

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

Definition at line 85 of file trail-cache-code-orbital-rings.frag.

References palette(), and TAU.

◆ rotate_2d()

mat2 rotate_2d ( float angle)

Evaluates rotate 2d for this shader effect.

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

Definition at line 65 of file trail-cache-code-orbital-rings.frag.

References rotate_2d().

◆ sample_cache()

vec4 sample_cache ( int index,
vec2 uv )

Evaluates sample cache for this shader effect.

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

Definition at line 95 of file trail-cache-code-orbital-rings.frag.

References CACHE_HISTORY_LAYER, mirror_repeat(), and sample_cache().

◆ sample_history()

float sample_history ( int index,
float frequency )

Evaluates sample history for this shader effect.

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

Definition at line 105 of file trail-cache-code-orbital-rings.frag.

References frequency, sample_history(), SIZE, SPECTRUM_HISTORY_LAYER, and spectrum_history_size.

Variable Documentation

◆ ext

ext

Definition at line 16 of file trail-cache-code-orbital-rings.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 58 of file trail-cache-code-orbital-rings.frag.