Vulkan fragment shader: trail-cache-code-phase-shear. 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 48 |
| #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 | |
| vec2 | mirror_repeat (vec2 point) |
| Evaluates mirror repeat for this shader effect. | |
| vec3 | palette (float phase) |
| Evaluates palette 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. | |
| vec2 | phase_warp (vec2 uv, float depth, float bass, float high) |
| Evaluates phase warp for this shader effect. | |
| void | main () |
| Executes the fragment shader entry point. | |
Variables | |
| ext | |
| const float | TAU = 6.28318530718 |
Vulkan fragment shader: trail-cache-code-phase-shear.
Definition in file trail-cache-code-phase-shear.frag.
| #define amp_high ext.audio_bands.z |
Definition at line 17 of file trail-cache-code-phase-shear.frag.
| #define amp_low ext.audio_bands.x |
Definition at line 18 of file trail-cache-code-phase-shear.frag.
| #define amp_mid ext.audio_bands.y |
Definition at line 19 of file trail-cache-code-phase-shear.frag.
| #define amp_peak ext.u2.w |
Definition at line 20 of file trail-cache-code-phase-shear.frag.
| #define amp_smooth ext.u3.w |
Definition at line 21 of file trail-cache-code-phase-shear.frag.
| #define CACHE_HISTORY_LAYER | ( | index | ) |
Definition at line 40 of file trail-cache-code-phase-shear.frag.
| #define EFFECT_ID 48 |
Definition at line 30 of file trail-cache-code-phase-shear.frag.
| #define history_head int(ext.u3.x) |
Definition at line 22 of file trail-cache-code-phase-shear.frag.
| #define iMouse ext.mouse |
Definition at line 23 of file trail-cache-code-phase-shear.frag.
| #define iResolution ext.u0.zw |
Definition at line 24 of file trail-cache-code-phase-shear.frag.
| #define SIZE 8 |
Definition at line 37 of file trail-cache-code-phase-shear.frag.
| #define spectrum_history_head int(ext.audio_history.x) |
Definition at line 25 of file trail-cache-code-phase-shear.frag.
| #define SPECTRUM_HISTORY_LAYER | ( | index | ) |
Definition at line 47 of file trail-cache-code-phase-shear.frag.
| #define spectrum_history_size int(ext.audio_history.y) |
Definition at line 26 of file trail-cache-code-phase-shear.frag.
| #define time_f ext.u2.y |
Definition at line 27 of file trail-cache-code-phase-shear.frag.
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file trail-cache-code-phase-shear.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 122 of file trail-cache-code-phase-shear.frag.
References amp_peak, amp_smooth, main(), palette(), phase_warp(), sample_cache(), sample_history(), SIZE, and time_f.
| vec2 mirror_repeat | ( | vec2 | point | ) |
Evaluates mirror repeat for this shader effect.
| point | Input value for the calculation. |
Definition at line 65 of file trail-cache-code-phase-shear.frag.
References mirror_repeat().
| vec3 palette | ( | float | phase | ) |
Evaluates palette for this shader effect.
| phase | Input value for the calculation. |
Definition at line 74 of file trail-cache-code-phase-shear.frag.
| vec2 phase_warp | ( | vec2 | uv, |
| float | depth, | ||
| float | bass, | ||
| float | high ) |
Evaluates phase warp for this shader effect.
| uv | Input value for the calculation. |
| depth | Input value for the calculation. |
| bass | Input value for the calculation. |
| high | Input value for the calculation. |
Definition at line 108 of file trail-cache-code-phase-shear.frag.
References phase_warp(), TAU, and time_f.
Referenced by main(), and phase_warp().
| 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 84 of file trail-cache-code-phase-shear.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 94 of file trail-cache-code-phase-shear.frag.
References frequency, sample_history(), SIZE, SPECTRUM_HISTORY_LAYER, and spectrum_history_size.
| ext |
Definition at line 16 of file trail-cache-code-phase-shear.frag.
| const float TAU = 6.28318530718 |
Definition at line 58 of file trail-cache-code-phase-shear.frag.