ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
darkstar-spectrum-trail-cache-aurora-crucible.frag File Reference

Vulkan fragment shader: darkstar-spectrum-trail-cache-aurora-crucible. More...

Go to the source code of this file.

Macros

#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 STYLE_ID   6
#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.
vec2 mirror_gradient (vec2 uv, vec2 screen_gradient)
 Evaluates mirror gradient for this shader effect.
vec4 sample_live (vec2 uv)
 Evaluates sample live for this shader effect.
vec4 sample_cache (vec2 uv, int index)
 Evaluates sample cache for this shader effect.
float spectrum_band (float center, float width)
 Evaluates spectrum band for this shader effect.
float history_band (int index, float center, float width)
 Evaluates history band for this shader effect.
vec3 palette (float phase)
 Evaluates palette for this shader effect.
vec3 tone_map (vec3 value)
 Evaluates tone map for this shader effect.
vec2 rotate_uv (vec2 uv, float angle, vec2 center, float aspect)
 Evaluates rotate uv for this shader effect.
vec2 kaleidoscope_uv (vec2 uv, float segments, vec2 center, float aspect)
 Evaluates kaleidoscope uv for this shader effect.
vec2 diamond_fold (vec2 uv, vec2 center, float aspect)
 Evaluates diamond fold for this shader effect.
vec2 fractal_fold (vec2 uv, vec2 center, float aspect, float zoom, float bass, float middle)
vec2 style_warp (vec2 uv, vec2 center, float aspect, float sub, float bass, float low_mid, float middle, float presence, float high, float air, float flux)
vec2 darkstar_wrap (vec2 uv, vec2 center, float aspect, float sub, float bass, float middle, float high, float flux)
vec3 soft_live (vec2 uv, vec2 texel, float spread)
 Evaluates soft live for this shader effect.
vec2 trail_transform (vec2 uv, vec2 center, float aspect, float progress, float old_sub, float old_bass, float old_middle, float old_high, float old_air)
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float PI = 3.14159265359
const float TAU = 6.28318530718

Detailed Description

Vulkan fragment shader: darkstar-spectrum-trail-cache-aurora-crucible.

Definition in file darkstar-spectrum-trail-cache-aurora-crucible.frag.

Macro Definition Documentation

◆ CACHE_HISTORY_LAYER

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

Definition at line 36 of file darkstar-spectrum-trail-cache-aurora-crucible.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 43 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

◆ STYLE_ID

#define STYLE_ID   6

Definition at line 26 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

Referenced by main(), and palette().

◆ time_f

#define time_f   ext.u2.y

Function Documentation

◆ darkstar_wrap()

vec2 darkstar_wrap ( vec2 uv,
vec2 center,
float aspect,
float sub,
float bass,
float middle,
float high,
float flux )

Definition at line 283 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References darkstar_wrap(), diamond(), and time_f.

Referenced by darkstar_wrap(), and main().

◆ diamond_fold()

vec2 diamond_fold ( vec2 uv,
vec2 center,
float aspect )

Evaluates diamond fold for this shader effect.

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

Definition at line 196 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References diamond_fold().

Referenced by diamond_fold(), and main().

◆ fractal_fold()

vec2 fractal_fold ( vec2 uv,
vec2 center,
float aspect,
float zoom,
float bass,
float middle )

Definition at line 202 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References fractal_fold(), rotate_uv(), and time_f.

Referenced by fractal_fold(), and main().

◆ history_band()

float history_band ( int index,
float center,
float width )

Evaluates history band for this shader effect.

Parameters
indexInput value for the calculation.
centerInput value for the calculation.
widthInput value for the calculation.
Returns
Computed float value.

Definition at line 128 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References history_band(), and SPECTRUM_HISTORY_LAYER.

Referenced by history_band(), and main().

◆ kaleidoscope_uv()

vec2 kaleidoscope_uv ( vec2 uv,
float segments,
vec2 center,
float aspect )

Evaluates kaleidoscope uv for this shader effect.

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

Definition at line 180 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References kaleidoscope_uv(), and TAU.

Referenced by kaleidoscope_uv(), 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 darkstar-spectrum-trail-cache-aurora-crucible.frag.

References layout().

◆ main()

◆ mirror_gradient()

vec2 mirror_gradient ( vec2 uv,
vec2 screen_gradient )

Evaluates mirror gradient for this shader effect.

Parameters
uvInput value for the calculation.
screen_gradientInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 78 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References mirror_gradient().

Referenced by mirror_gradient(), sample_cache(), sample_cache_layer(), and sample_live().

◆ 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 68 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References mirror_repeat().

◆ palette()

vec3 palette ( float phase)

Evaluates palette for this shader effect.

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

Definition at line 141 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References palette(), STYLE_ID, 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 57 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References rotate_2d().

◆ rotate_uv()

vec2 rotate_uv ( vec2 uv,
float angle,
vec2 center,
float aspect )

Evaluates rotate uv for this shader effect.

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

Definition at line 166 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References rotate_2d(), and rotate_uv().

Referenced by fractal_fold(), and rotate_uv().

◆ sample_cache()

vec4 sample_cache ( vec2 uv,
int index )

Evaluates sample cache for this shader effect.

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

Definition at line 101 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

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

◆ sample_live()

vec4 sample_live ( vec2 uv)

Evaluates sample live for this shader effect.

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

Definition at line 89 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References mirror_gradient(), mirror_repeat(), and sample_live().

Referenced by main(), sample_live(), soft_live(), and soft_sample().

◆ soft_live()

vec3 soft_live ( vec2 uv,
vec2 texel,
float spread )

Evaluates soft live for this shader effect.

Parameters
uvInput value for the calculation.
texelInput value for the calculation.
spreadInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 308 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References sample_live(), and soft_live().

Referenced by main(), and soft_live().

◆ spectrum_band()

float spectrum_band ( float center,
float width )

Evaluates spectrum band for this shader effect.

Parameters
centerInput value for the calculation.
widthInput value for the calculation.
Returns
Computed float value.

Definition at line 114 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References spectrum_band().

Referenced by main(), and spectrum_band().

◆ style_warp()

vec2 style_warp ( vec2 uv,
vec2 center,
float aspect,
float sub,
float bass,
float low_mid,
float middle,
float presence,
float high,
float air,
float flux )

Definition at line 215 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References PI, rotate_2d(), style_warp(), TAU, and time_f.

Referenced by main(), and style_warp().

◆ tone_map()

vec3 tone_map ( vec3 value)

Evaluates tone map for this shader effect.

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

Definition at line 151 of file darkstar-spectrum-trail-cache-aurora-crucible.frag.

References tone_map().

◆ trail_transform()

vec2 trail_transform ( vec2 uv,
vec2 center,
float aspect,
float progress,
float old_sub,
float old_bass,
float old_middle,
float old_high,
float old_air )

Variable Documentation

◆ ext

ext

◆ PI

const float PI = 3.14159265359

◆ TAU

const float TAU = 6.28318530718