Vulkan fragment shader: inversion code cache resonance cavity. 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 | rotate2 (vec2 p, float angle) |
| Evaluates rotate2 for this shader effect. | |
| float | segmentDistance (vec2 p, vec2 a, vec2 b) |
| Evaluates segmentDistance for this shader effect. | |
| vec2 | mirrorUV (vec2 uv) |
| Evaluates mirrorUV for this shader effect. | |
| vec3 | palette (float phase) |
| Evaluates palette 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 | energyField (vec2 p, float age, vec4 band) |
| Evaluates energyField 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.67 |
Vulkan fragment shader: inversion code cache resonance cavity.
Definition in file inversion_code_cache_resonance_cavity.frag.
| #define amp_peak ext.u2.w |
Definition at line 17 of file inversion_code_cache_resonance_cavity.frag.
| #define amp_smooth ext.u3.w |
Definition at line 18 of file inversion_code_cache_resonance_cavity.frag.
| #define CACHE_HISTORY_LAYER | ( | index | ) |
Definition at line 37 of file inversion_code_cache_resonance_cavity.frag.
| #define history_head int(ext.u3.x) |
Definition at line 19 of file inversion_code_cache_resonance_cavity.frag.
| #define iResolution ext.u0.zw |
Definition at line 20 of file inversion_code_cache_resonance_cavity.frag.
| #define iTime ext.u0.y |
Definition at line 21 of file inversion_code_cache_resonance_cavity.frag.
| #define SIZE 8 |
Definition at line 34 of file inversion_code_cache_resonance_cavity.frag.
| #define spectrum_history_head int(ext.audio_history.x) |
Definition at line 22 of file inversion_code_cache_resonance_cavity.frag.
| #define SPECTRUM_HISTORY_LAYER | ( | index | ) |
Definition at line 44 of file inversion_code_cache_resonance_cavity.frag.
| #define spectrum_history_size int(ext.audio_history.y) |
Definition at line 23 of file inversion_code_cache_resonance_cavity.frag.
| #define time_f ext.u2.y |
Definition at line 24 of file inversion_code_cache_resonance_cavity.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 173 of file inversion_code_cache_resonance_cavity.frag.
References CACHE_HISTORY_LAYER, and cacheFrame().
| float clockTime | ( | ) |
Evaluates clockTime for this shader effect.
Definition at line 60 of file inversion_code_cache_resonance_cavity.frag.
References clockTime(), iTime, and time_f.
| vec3 energyField | ( | vec2 | p, |
| float | age, | ||
| vec4 | band ) |
Evaluates energyField 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 232 of file inversion_code_cache_resonance_cavity.frag.
References clockTime(), energy(), energyField(), harmonic(), and PI.
| float fbm | ( | vec2 | p | ) |
Evaluates fbm for this shader effect.
| p | Input value for the calculation. |
Definition at line 100 of file inversion_code_cache_resonance_cavity.frag.
| float hash21 | ( | vec2 | p | ) |
Evaluates hash21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 69 of file inversion_code_cache_resonance_cavity.frag.
References hash21().
| vec2 hash22 | ( | vec2 | p | ) |
Evaluates hash22 for this shader effect.
| p | Input value for the calculation. |
Definition at line 78 of file inversion_code_cache_resonance_cavity.frag.
References hash22().
| vec4 historyBands | ( | int | index | ) |
Evaluates historyBands for this shader effect.
| index | Input value for the calculation. |
Definition at line 220 of file inversion_code_cache_resonance_cavity.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 inversion_code_cache_resonance_cavity.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 247 of file inversion_code_cache_resonance_cavity.frag.
References amp_peak, amp_smooth, cacheFrame(), clockTime(), energy(), energyField(), field(), historyBands(), iResolution, luminance(), main(), mirrorUV(), palette(), rotate2(), TAU, and toneMap().
| vec2 mirrorUV | ( | vec2 | uv | ) |
Evaluates mirrorUV for this shader effect.
| uv | Input value for the calculation. |
Definition at line 142 of file inversion_code_cache_resonance_cavity.frag.
References mirrorUV().
| float noise21 | ( | vec2 | p | ) |
Evaluates noise21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 87 of file inversion_code_cache_resonance_cavity.frag.
| vec3 palette | ( | float | phase | ) |
Evaluates palette for this shader effect.
| phase | Input value for the calculation. |
Definition at line 151 of file inversion_code_cache_resonance_cavity.frag.
References HUE_OFFSET, palette(), and TAU.
| vec2 rotate2 | ( | vec2 | p, |
| float | angle ) |
Evaluates rotate2 for this shader effect.
| p | Input value for the calculation. |
| angle | Input value for the calculation. |
Definition at line 118 of file inversion_code_cache_resonance_cavity.frag.
References rotate2().
| float segmentDistance | ( | vec2 | p, |
| vec2 | a, | ||
| vec2 | b ) |
Evaluates segmentDistance for this shader effect.
| p | Input value for the calculation. |
| a | Input value for the calculation. |
| b | Input value for the calculation. |
Definition at line 131 of file inversion_code_cache_resonance_cavity.frag.
References segmentDistance().
| 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 197 of file inversion_code_cache_resonance_cavity.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 161 of file inversion_code_cache_resonance_cavity.frag.
References toneMap().
| ext |
Definition at line 16 of file inversion_code_cache_resonance_cavity.frag.
| const float HUE_OFFSET = 0.67 |
Definition at line 54 of file inversion_code_cache_resonance_cavity.frag.
| const float PI = 3.14159265359 |
Definition at line 52 of file inversion_code_cache_resonance_cavity.frag.
| const float TAU = 6.28318530718 |
Definition at line 53 of file inversion_code_cache_resonance_cavity.frag.