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

Vulkan fragment shader: inv cache code dreamlogic mosaic. 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 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 clockTime ()
 Evaluates clockTime for this shader effect.
float hash21 (vec2 p)
 Evaluates hash21 for this shader effect.
vec2 hash22 (vec2 p)
 Evaluates hash22 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 mirrorUV (vec2 uv)
 Evaluates mirrorUV for this shader effect.
vec3 perceptualPalette (float phase)
 Evaluates perceptualPalette for this shader effect.
vec3 toneMap (vec3 value)
 Evaluates toneMap for this shader effect.
vec4 cacheFrame (int index, vec2 uv)
 Evaluates cacheFrame for this shader effect.
float spectrumHistory (int index, float frequency)
 Evaluates spectrumHistory for this shader effect.
vec4 historyBands (int index)
 Evaluates historyBands for this shader effect.
vec3 perceptualField (vec2 p, float age, vec4 band)
 Evaluates perceptualField for this shader effect.
void main (void)
 Executes the fragment shader entry point.

Variables

 ext
const float PI = 3.14159265359
const float TAU = 6.28318530718
const float HUE_OFFSET = 0.84
const float DISTORTION = 0.98
const float PERSISTENCE = 0.93

Detailed Description

Vulkan fragment shader: inv cache code dreamlogic mosaic.

Definition in file inv_cache_code_dreamlogic_mosaic.frag.

Macro Definition Documentation

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 17 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 18 of file inv_cache_code_dreamlogic_mosaic.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 inv_cache_code_dreamlogic_mosaic.frag.

◆ history_head

#define history_head   int(ext.u3.x)

Definition at line 19 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 20 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ iTime

#define iTime   ext.u0.y

Definition at line 21 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ SIZE

#define SIZE   8

Definition at line 34 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

Definition at line 22 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ SPECTRUM_HISTORY_LAYER

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

Definition at line 44 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

Definition at line 23 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 24 of file inv_cache_code_dreamlogic_mosaic.frag.

Function Documentation

◆ cacheFrame()

vec4 cacheFrame ( int index,
vec2 uv )

Evaluates cacheFrame for this shader effect.

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

Definition at line 150 of file inv_cache_code_dreamlogic_mosaic.frag.

References CACHE_HISTORY_LAYER, and cacheFrame().

◆ clockTime()

float clockTime ( )

Evaluates clockTime for this shader effect.

Returns
Computed float value.

Definition at line 62 of file inv_cache_code_dreamlogic_mosaic.frag.

References clockTime(), iTime, and time_f.

◆ fbm()

float fbm ( vec2 p)

Evaluates fbm for this shader effect.

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

Definition at line 102 of file inv_cache_code_dreamlogic_mosaic.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 71 of file inv_cache_code_dreamlogic_mosaic.frag.

References hash21().

◆ hash22()

vec2 hash22 ( vec2 p)

Evaluates hash22 for this shader effect.

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

Definition at line 80 of file inv_cache_code_dreamlogic_mosaic.frag.

References hash22().

◆ historyBands()

vec4 historyBands ( int index)

Evaluates historyBands for this shader effect.

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

Definition at line 197 of file inv_cache_code_dreamlogic_mosaic.frag.

References historyBands(), and spectrumHistory().

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

References layout().

◆ main()

void main ( void )

◆ mirrorUV()

vec2 mirrorUV ( vec2 uv)

Evaluates mirrorUV for this shader effect.

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

Definition at line 119 of file inv_cache_code_dreamlogic_mosaic.frag.

References mirrorUV().

◆ noise21()

float noise21 ( vec2 p)

Evaluates noise21 for this shader effect.

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

Definition at line 89 of file inv_cache_code_dreamlogic_mosaic.frag.

References cell(), hash21(), and noise21().

◆ perceptualField()

vec3 perceptualField ( vec2 p,
float age,
vec4 band )

Evaluates perceptualField for this shader effect.

Parameters
pInput value for the calculation.
ageInput value for the calculation.
bandInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 209 of file inv_cache_code_dreamlogic_mosaic.frag.

References clockTime(), fbm(), hash21(), hash22(), perceptualField(), and TAU.

◆ perceptualPalette()

vec3 perceptualPalette ( float phase)

Evaluates perceptualPalette for this shader effect.

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

Definition at line 128 of file inv_cache_code_dreamlogic_mosaic.frag.

References HUE_OFFSET, perceptualPalette(), TAU, and wave().

◆ spectrumHistory()

float spectrumHistory ( int index,
float frequency )

Evaluates spectrumHistory for this shader effect.

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

Definition at line 174 of file inv_cache_code_dreamlogic_mosaic.frag.

References frequency, SPECTRUM_HISTORY_LAYER, and spectrumHistory().

◆ toneMap()

vec3 toneMap ( vec3 value)

Evaluates toneMap for this shader effect.

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

Definition at line 139 of file inv_cache_code_dreamlogic_mosaic.frag.

References toneMap().

Variable Documentation

◆ DISTORTION

const float DISTORTION = 0.98

Definition at line 55 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ ext

ext

Definition at line 16 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ HUE_OFFSET

const float HUE_OFFSET = 0.84

Definition at line 54 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ PERSISTENCE

const float PERSISTENCE = 0.93

Definition at line 56 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ PI

const float PI = 3.14159265359

Definition at line 52 of file inv_cache_code_dreamlogic_mosaic.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 53 of file inv_cache_code_dreamlogic_mosaic.frag.