Vulkan fragment shader: color peak cache chrono-crystalline-resonator. 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 | 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 | hash21 (vec2 p) |
| Evaluates hash21 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 | repeatMirror (vec2 p) |
| Evaluates repeatMirror for this shader effect. | |
| vec3 | acid (float t) |
| Evaluates acid for this shader effect. | |
| vec3 | spectral (float x) |
| Evaluates spectral for this shader effect. | |
| vec3 | aces (vec3 x) |
| Evaluates aces for this shader effect. | |
| float | heightField (vec2 p, vec2 effectOrigin, float bass, float mid) |
| Evaluates heightField for this shader effect. | |
| vec3 | normalAt (vec2 p, float e, vec2 origin, float bass, float mid) |
| Evaluates normalAt for this shader effect. | |
| vec3 | metalLight (vec3 base, vec3 n, vec2 p, float rough) |
| Evaluates metalLight for this shader effect. | |
| vec4 | sampleCache (int idx, vec2 uv) |
| Evaluates sampleCache for this shader effect. | |
| float | sampleSpectrumHistory (int idx, float freq) |
| Evaluates sampleSpectrumHistory for this shader effect. | |
| void | main (void) |
| Executes the fragment shader entry point. | |
Variables | |
| ext | |
| const float | TAU = 6.28318530718 |
Vulkan fragment shader: color peak cache chrono-crystalline-resonator.
Definition in file color_peak_cache_chrono-crystalline-resonator.frag.
| #define amp_high ext.audio_bands.z |
Definition at line 17 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define amp_low ext.audio_bands.x |
Definition at line 18 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define amp_mid ext.audio_bands.y |
Definition at line 19 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define amp_peak ext.u2.w |
Definition at line 20 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define amp_smooth ext.u3.w |
Definition at line 21 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define CACHE_HISTORY_LAYER | ( | index | ) |
Definition at line 43 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define history_head int(ext.u3.x) |
Definition at line 22 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define iMouse ext.mouse |
Definition at line 23 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define iResolution ext.u0.zw |
Definition at line 24 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define SIZE 8 |
Definition at line 40 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define spectrum_history_head int(ext.audio_history.x) |
Definition at line 25 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define SPECTRUM_HISTORY_LAYER | ( | index | ) |
Definition at line 52 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define spectrum_history_size int(ext.audio_history.y) |
Definition at line 26 of file color_peak_cache_chrono-crystalline-resonator.frag.
| #define time_f ext.u2.y |
Definition at line 27 of file color_peak_cache_chrono-crystalline-resonator.frag.
| vec3 aces | ( | vec3 | x | ) |
Evaluates aces for this shader effect.
| x | Input value for the calculation. |
Definition at line 142 of file color_peak_cache_chrono-crystalline-resonator.frag.
References aces().
| vec3 acid | ( | float | t | ) |
Evaluates acid for this shader effect.
| t | Input value for the calculation. |
Definition at line 120 of file color_peak_cache_chrono-crystalline-resonator.frag.
| float fbm | ( | vec2 | p | ) |
Evaluates fbm for this shader effect.
| p | Input value for the calculation. |
Definition at line 94 of file color_peak_cache_chrono-crystalline-resonator.frag.
| float hash21 | ( | vec2 | p | ) |
Evaluates hash21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 73 of file color_peak_cache_chrono-crystalline-resonator.frag.
References hash21().
| float heightField | ( | vec2 | p, |
| vec2 | effectOrigin, | ||
| float | bass, | ||
| float | mid ) |
Evaluates heightField for this shader effect.
| p | Input value for the calculation. |
| effectOrigin | Input value for the calculation. |
| bass | Input value for the calculation. |
| mid | Input value for the calculation. |
Definition at line 155 of file color_peak_cache_chrono-crystalline-resonator.frag.
References amp_high, fbm(), heightField(), time_f, and wave().
Referenced by heightField(), heightField(), main(), normalAt(), normalAt(), and surfaceNormal().
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file color_peak_cache_chrono-crystalline-resonator.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 257 of file color_peak_cache_chrono-crystalline-resonator.frag.
References aces(), acid(), alloy(), amp_high, amp_low, amp_peak, amp_smooth, fbm(), h(), heightField(), iMouse, iResolution, lum(), main(), metalLight(), n(), normalAt(), repeatMirror(), rot(), sampleCache(), sampleSpectrumHistory(), and time_f.
| vec3 metalLight | ( | vec3 | base, |
| vec3 | n, | ||
| vec2 | p, | ||
| float | rough ) |
Evaluates metalLight for this shader effect.
| base | Input value for the calculation. |
| n | Input value for the calculation. |
| p | Input value for the calculation. |
| rough | Input value for the calculation. |
Definition at line 202 of file color_peak_cache_chrono-crystalline-resonator.frag.
References metalLight(), n(), spectral(), and time_f.
Referenced by main(), and metalLight().
| float noise21 | ( | vec2 | p | ) |
Evaluates noise21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 82 of file color_peak_cache_chrono-crystalline-resonator.frag.
| vec3 normalAt | ( | vec2 | p, |
| float | e, | ||
| vec2 | origin, | ||
| float | bass, | ||
| float | mid ) |
Evaluates normalAt for this shader effect.
| p | Input value for the calculation. |
| e | Input value for the calculation. |
| origin | Input value for the calculation. |
| bass | Input value for the calculation. |
| mid | Input value for the calculation. |
Definition at line 187 of file color_peak_cache_chrono-crystalline-resonator.frag.
References h(), heightField(), and normalAt().
Referenced by main(), normalAt(), and normalAt().
| vec2 repeatMirror | ( | vec2 | p | ) |
Evaluates repeatMirror for this shader effect.
| p | Input value for the calculation. |
Definition at line 110 of file color_peak_cache_chrono-crystalline-resonator.frag.
References repeatMirror().
Referenced by main(), and repeatMirror().
| vec4 sampleCache | ( | int | idx, |
| vec2 | uv ) |
Evaluates sampleCache for this shader effect.
| idx | Input value for the calculation. |
| uv | Input value for the calculation. |
Definition at line 227 of file color_peak_cache_chrono-crystalline-resonator.frag.
References CACHE_HISTORY_LAYER, and sampleCache().
| float sampleSpectrumHistory | ( | int | idx, |
| float | freq ) |
Evaluates sampleSpectrumHistory for this shader effect.
| idx | Input value for the calculation. |
| freq | Input value for the calculation. |
Definition at line 244 of file color_peak_cache_chrono-crystalline-resonator.frag.
References sampleSpectrumHistory(), and SPECTRUM_HISTORY_LAYER.
Referenced by main(), main(), and sampleSpectrumHistory().
| vec3 spectral | ( | float | x | ) |
Evaluates spectral for this shader effect.
| x | Input value for the calculation. |
Definition at line 133 of file color_peak_cache_chrono-crystalline-resonator.frag.
References spectral(), and TAU.
| ext |
Definition at line 16 of file color_peak_cache_chrono-crystalline-resonator.frag.
| const float TAU = 6.28318530718 |
Definition at line 65 of file color_peak_cache_chrono-crystalline-resonator.frag.