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 |
Vulkan fragment shader: inv cache code dreamlogic mosaic.
Definition in file inv_cache_code_dreamlogic_mosaic.frag.
| #define amp_peak ext.u2.w |
Definition at line 17 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define amp_smooth ext.u3.w |
Definition at line 18 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define CACHE_HISTORY_LAYER | ( | index | ) |
Definition at line 37 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define history_head int(ext.u3.x) |
Definition at line 19 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define iResolution ext.u0.zw |
Definition at line 20 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define iTime ext.u0.y |
Definition at line 21 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define SIZE 8 |
Definition at line 34 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define spectrum_history_head int(ext.audio_history.x) |
Definition at line 22 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define SPECTRUM_HISTORY_LAYER | ( | index | ) |
Definition at line 44 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define spectrum_history_size int(ext.audio_history.y) |
Definition at line 23 of file inv_cache_code_dreamlogic_mosaic.frag.
| #define time_f ext.u2.y |
Definition at line 24 of file inv_cache_code_dreamlogic_mosaic.frag.
| vec4 cacheFrame | ( | int | index, |
| vec2 | uv ) |
Evaluates cacheFrame for this shader effect.
| index | Input value for the calculation. |
| uv | Input value for the calculation. |
Definition at line 150 of file inv_cache_code_dreamlogic_mosaic.frag.
References CACHE_HISTORY_LAYER, and cacheFrame().
| float clockTime | ( | ) |
Evaluates clockTime for this shader effect.
Definition at line 62 of file inv_cache_code_dreamlogic_mosaic.frag.
References clockTime(), iTime, and time_f.
| float fbm | ( | vec2 | p | ) |
Evaluates fbm for this shader effect.
| p | Input value for the calculation. |
Definition at line 102 of file inv_cache_code_dreamlogic_mosaic.frag.
| float hash21 | ( | vec2 | p | ) |
Evaluates hash21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 71 of file inv_cache_code_dreamlogic_mosaic.frag.
References hash21().
| vec2 hash22 | ( | vec2 | p | ) |
Evaluates hash22 for this shader effect.
| p | Input value for the calculation. |
Definition at line 80 of file inv_cache_code_dreamlogic_mosaic.frag.
References hash22().
| vec4 historyBands | ( | int | index | ) |
Evaluates historyBands for this shader effect.
| index | Input value for the calculation. |
Definition at line 197 of file inv_cache_code_dreamlogic_mosaic.frag.
References historyBands(), and spectrumHistory().
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file inv_cache_code_dreamlogic_mosaic.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 241 of file inv_cache_code_dreamlogic_mosaic.frag.
References amp_peak, amp_smooth, cacheFrame(), clockTime(), DISTORTION, energy(), field(), historyBands(), iResolution, main(), mirrorUV(), perceptualField(), perceptualPalette(), PERSISTENCE, and toneMap().
| vec2 mirrorUV | ( | vec2 | uv | ) |
Evaluates mirrorUV for this shader effect.
| uv | Input value for the calculation. |
Definition at line 119 of file inv_cache_code_dreamlogic_mosaic.frag.
References mirrorUV().
| float noise21 | ( | vec2 | p | ) |
Evaluates noise21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 89 of file inv_cache_code_dreamlogic_mosaic.frag.
| vec3 perceptualField | ( | vec2 | p, |
| float | age, | ||
| vec4 | band ) |
Evaluates perceptualField for this shader effect.
| p | Input value for the calculation. |
| age | Input value for the calculation. |
| band | Input value for the calculation. |
Definition at line 209 of file inv_cache_code_dreamlogic_mosaic.frag.
References clockTime(), fbm(), hash21(), hash22(), perceptualField(), and TAU.
| vec3 perceptualPalette | ( | float | phase | ) |
Evaluates perceptualPalette for this shader effect.
| phase | Input value for the calculation. |
Definition at line 128 of file inv_cache_code_dreamlogic_mosaic.frag.
References HUE_OFFSET, perceptualPalette(), TAU, and wave().
| float spectrumHistory | ( | int | index, |
| float | frequency ) |
Evaluates spectrumHistory for this shader effect.
| index | Input value for the calculation. |
| frequency | Input value for the calculation. |
Definition at line 174 of file inv_cache_code_dreamlogic_mosaic.frag.
References frequency, SPECTRUM_HISTORY_LAYER, and spectrumHistory().
| vec3 toneMap | ( | vec3 | value | ) |
Evaluates toneMap for this shader effect.
| value | Input value for the calculation. |
Definition at line 139 of file inv_cache_code_dreamlogic_mosaic.frag.
References toneMap().
| const float DISTORTION = 0.98 |
Definition at line 55 of file inv_cache_code_dreamlogic_mosaic.frag.
| ext |
Definition at line 16 of file inv_cache_code_dreamlogic_mosaic.frag.
| const float HUE_OFFSET = 0.84 |
Definition at line 54 of file inv_cache_code_dreamlogic_mosaic.frag.
| const float PERSISTENCE = 0.93 |
Definition at line 56 of file inv_cache_code_dreamlogic_mosaic.frag.
| const float PI = 3.14159265359 |
Definition at line 52 of file inv_cache_code_dreamlogic_mosaic.frag.
| const float TAU = 6.28318530718 |
Definition at line 53 of file inv_cache_code_dreamlogic_mosaic.frag.