Vulkan fragment shader: af scale-cache-code-aurora-interference. 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 13 |
| #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. | |
| float | ping_pong (float value, float size) |
| Evaluates ping pong for this shader effect. | |
| float | hash_21 (vec2 point) |
| Evaluates hash 21 for this shader effect. | |
| float | value_noise (vec2 point) |
| Evaluates value noise for this shader effect. | |
| float | fbm (vec2 point) |
| Evaluates fbm for this shader effect. | |
| vec2 | hex_cell (vec2 point) |
| Evaluates hex cell for this shader effect. | |
| vec2 | kaleidoscope (vec2 point, float sides) |
| Evaluates kaleidoscope for this shader effect. | |
| vec3 | acid_palette (float phase, float hue_offset) |
| Evaluates acid palette for this shader effect. | |
| vec3 | color_scale (vec3 video, vec3 acid_color, float energy) |
| Evaluates color scale for this shader effect. | |
| vec3 | tone_map (vec3 value) |
| Evaluates tone map 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. | |
| vec4 | soft_sample (sampler2D image, vec2 uv, vec2 texel, float spread) |
| Evaluates soft sample for this shader effect. | |
| float | effect_field (vec2 point, float bass, float middle, float treble) |
| Evaluates effect field for this shader effect. | |
| vec2 | cache_transform (vec2 uv, vec2 center, float age, float bass, float middle, float treble, vec2 flow) |
| void | main () |
| Executes the fragment shader entry point. | |
Variables | |
| ext | |
| const float | PI = 3.14159265359 |
| const float | TAU = 6.28318530718 |
Vulkan fragment shader: af scale-cache-code-aurora-interference.
Definition in file af_scale-cache-code-aurora-interference.frag.
| #define amp_high ext.audio_bands.z |
Definition at line 13 of file af_scale-cache-code-aurora-interference.frag.
| #define amp_low ext.audio_bands.x |
Definition at line 14 of file af_scale-cache-code-aurora-interference.frag.
| #define amp_mid ext.audio_bands.y |
Definition at line 15 of file af_scale-cache-code-aurora-interference.frag.
| #define amp_peak ext.u2.w |
Definition at line 16 of file af_scale-cache-code-aurora-interference.frag.
| #define amp_smooth ext.u3.w |
Definition at line 17 of file af_scale-cache-code-aurora-interference.frag.
| #define CACHE_HISTORY_LAYER | ( | index | ) |
Definition at line 41 of file af_scale-cache-code-aurora-interference.frag.
| #define EFFECT_ID 13 |
Definition at line 31 of file af_scale-cache-code-aurora-interference.frag.
| #define history_head int(ext.u3.x) |
Definition at line 18 of file af_scale-cache-code-aurora-interference.frag.
| #define iMouse ext.mouse |
Definition at line 19 of file af_scale-cache-code-aurora-interference.frag.
| #define iResolution ext.u0.zw |
Definition at line 20 of file af_scale-cache-code-aurora-interference.frag.
| #define SIZE 8 |
Definition at line 38 of file af_scale-cache-code-aurora-interference.frag.
| #define spectrum_history_head int(ext.audio_history.x) |
Definition at line 21 of file af_scale-cache-code-aurora-interference.frag.
| #define SPECTRUM_HISTORY_LAYER | ( | index | ) |
Definition at line 48 of file af_scale-cache-code-aurora-interference.frag.
| #define spectrum_history_size int(ext.audio_history.y) |
Definition at line 22 of file af_scale-cache-code-aurora-interference.frag.
| #define time_f ext.u2.y |
Definition at line 23 of file af_scale-cache-code-aurora-interference.frag.
| vec3 acid_palette | ( | float | phase, |
| float | hue_offset ) |
Evaluates acid palette for this shader effect.
| phase | Input value for the calculation. |
| hue_offset | Input value for the calculation. |
Definition at line 163 of file af_scale-cache-code-aurora-interference.frag.
References acid_palette(), EFFECT_ID, frequency, and TAU.
Referenced by acid_palette(), acid_palette(), acid_palette(), and main().
| vec2 cache_transform | ( | vec2 | uv, |
| vec2 | center, | ||
| float | age, | ||
| float | bass, | ||
| float | middle, | ||
| float | treble, | ||
| vec2 | flow ) |
Definition at line 386 of file af_scale-cache-code-aurora-interference.frag.
References cache_transform(), EFFECT_ID, mirror_repeat(), time_f, and wave().
| vec3 color_scale | ( | vec3 | video, |
| vec3 | acid_color, | ||
| float | energy ) |
Evaluates color scale for this shader effect.
| video | Input value for the calculation. |
| acid_color | Input value for the calculation. |
| energy | Input value for the calculation. |
Definition at line 180 of file af_scale-cache-code-aurora-interference.frag.
References color_scale(), energy(), and luminance().
Referenced by color_scale(), and main().
| float effect_field | ( | vec2 | point, |
| float | bass, | ||
| float | middle, | ||
| float | treble ) |
Evaluates effect field for this shader effect.
| point | Input value for the calculation. |
| bass | Input value for the calculation. |
| middle | Input value for the calculation. |
| treble | Input value for the calculation. |
Definition at line 276 of file af_scale-cache-code-aurora-interference.frag.
References aurora(), cell(), crystal(), diamond(), effect_field(), fbm(), field(), fold(), hex_cell(), kaleidoscope(), PI, ping_pong(), rotate_2d(), and time_f.
| float fbm | ( | vec2 | point | ) |
Evaluates fbm for this shader effect.
| point | Input value for the calculation. |
Definition at line 121 of file af_scale-cache-code-aurora-interference.frag.
References fbm(), rotate_2d(), and value_noise().
| float hash_21 | ( | vec2 | point | ) |
Evaluates hash 21 for this shader effect.
| point | Input value for the calculation. |
Definition at line 98 of file af_scale-cache-code-aurora-interference.frag.
References hash_21().
| vec2 hex_cell | ( | vec2 | point | ) |
Evaluates hex cell for this shader effect.
| point | Input value for the calculation. |
Definition at line 137 of file af_scale-cache-code-aurora-interference.frag.
References hex_cell().
| vec2 kaleidoscope | ( | vec2 | point, |
| float | sides ) |
Evaluates kaleidoscope for this shader effect.
| point | Input value for the calculation. |
| sides | Input value for the calculation. |
Definition at line 150 of file af_scale-cache-code-aurora-interference.frag.
References kaleidoscope(), and TAU.
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 3 of file af_scale-cache-code-aurora-interference.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 427 of file af_scale-cache-code-aurora-interference.frag.
References acid_palette(), amp_high, amp_low, amp_peak, amp_smooth, cache_transform(), color_scale(), effect_field(), EFFECT_ID, field(), iMouse, iResolution, luminance(), main(), mirror_repeat(), PI, sample_cache(), sample_history(), soft_sample(), time_f, and tone_map().
| vec2 mirror_repeat | ( | vec2 | point | ) |
Evaluates mirror repeat for this shader effect.
| point | Input value for the calculation. |
Definition at line 78 of file af_scale-cache-code-aurora-interference.frag.
References mirror_repeat().
| float ping_pong | ( | float | value, |
| float | size ) |
Evaluates ping pong for this shader effect.
| value | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 88 of file af_scale-cache-code-aurora-interference.frag.
References ping_pong().
| mat2 rotate_2d | ( | float | angle | ) |
Evaluates rotate 2d for this shader effect.
| angle | Input value for the calculation. |
Definition at line 67 of file af_scale-cache-code-aurora-interference.frag.
References rotate_2d().
| vec4 sample_cache | ( | int | index, |
| vec2 | uv ) |
Evaluates sample cache for this shader effect.
| index | Input value for the calculation. |
| uv | Input value for the calculation. |
Definition at line 206 of file af_scale-cache-code-aurora-interference.frag.
References CACHE_HISTORY_LAYER, mirror_repeat(), and sample_cache().
| float sample_history | ( | int | index, |
| float | frequency ) |
Evaluates sample history for this shader effect.
| index | Input value for the calculation. |
| frequency | Input value for the calculation. |
Definition at line 231 of file af_scale-cache-code-aurora-interference.frag.
References frequency, sample_history(), and SPECTRUM_HISTORY_LAYER.
| vec4 soft_sample | ( | sampler2D | image, |
| vec2 | uv, | ||
| vec2 | texel, | ||
| float | spread ) |
Evaluates soft sample for this shader effect.
| image | Input value for the calculation. |
| uv | Input value for the calculation. |
| texel | Input value for the calculation. |
| spread | Input value for the calculation. |
Definition at line 255 of file af_scale-cache-code-aurora-interference.frag.
References mirror_repeat(), and soft_sample().
| vec3 tone_map | ( | vec3 | value | ) |
Evaluates tone map for this shader effect.
| value | Input value for the calculation. |
Definition at line 193 of file af_scale-cache-code-aurora-interference.frag.
References tone_map().
| float value_noise | ( | vec2 | point | ) |
Evaluates value noise for this shader effect.
| point | Input value for the calculation. |
Definition at line 107 of file af_scale-cache-code-aurora-interference.frag.
References cell(), hash_21(), and value_noise().
| ext |
Definition at line 12 of file af_scale-cache-code-aurora-interference.frag.
| const float PI = 3.14159265359 |
Definition at line 59 of file af_scale-cache-code-aurora-interference.frag.
| const float TAU = 6.28318530718 |
Definition at line 60 of file af_scale-cache-code-aurora-interference.frag.