Vulkan fragment shader: liquid code iridescent whirlpool. 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 | iResolution ext.u0.zw |
| #define | time_f ext.u2.y |
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 | turbulentFbm (vec2 p) |
| Evaluates turbulentFbm for this shader effect. | |
| vec2 | rotate2 (vec2 p, float angle) |
| Evaluates rotate2 for this shader effect. | |
| vec2 | mirrorUV (vec2 uv) |
| Evaluates mirrorUV for this shader effect. | |
| vec3 | interference (float phase, float thickness) |
| Evaluates interference for this shader effect. | |
| float | whirlpoolHeight (vec2 p) |
| Evaluates whirlpoolHeight for this shader effect. | |
| vec3 | whirlpoolNormal (vec2 p, float e) |
| Evaluates whirlpoolNormal for this shader effect. | |
| vec3 | refractedTexture (vec2 uv, vec2 tangent, vec2 normalFlow, float split) |
| Evaluates refractedTexture for this shader effect. | |
| float | anisotropicSpecular (vec3 n, vec3 v, vec3 l, vec3 tangent, float roughness) |
| Evaluates anisotropicSpecular for this shader effect. | |
| vec3 | iridescentMetal (vec3 base, vec3 n, vec2 p, float thickness, float roughness) |
| Evaluates iridescentMetal for this shader effect. | |
| vec3 | toneMap (vec3 value) |
| Evaluates toneMap 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 |
Vulkan fragment shader: liquid code iridescent whirlpool.
Definition in file liquid_code_iridescent_whirlpool.frag.
| #define amp_high ext.audio_bands.z |
Definition at line 17 of file liquid_code_iridescent_whirlpool.frag.
| #define amp_low ext.audio_bands.x |
Definition at line 18 of file liquid_code_iridescent_whirlpool.frag.
| #define amp_mid ext.audio_bands.y |
Definition at line 19 of file liquid_code_iridescent_whirlpool.frag.
| #define amp_peak ext.u2.w |
Definition at line 20 of file liquid_code_iridescent_whirlpool.frag.
| #define amp_smooth ext.u3.w |
Definition at line 21 of file liquid_code_iridescent_whirlpool.frag.
| #define iResolution ext.u0.zw |
Definition at line 22 of file liquid_code_iridescent_whirlpool.frag.
| #define time_f ext.u2.y |
Definition at line 23 of file liquid_code_iridescent_whirlpool.frag.
| float anisotropicSpecular | ( | vec3 | n, |
| vec3 | v, | ||
| vec3 | l, | ||
| vec3 | tangent, | ||
| float | roughness ) |
Evaluates anisotropicSpecular for this shader effect.
| n | Input value for the calculation. |
| v | Input value for the calculation. |
| l | Input value for the calculation. |
| tangent | Input value for the calculation. |
| roughness | Input value for the calculation. |
Definition at line 181 of file liquid_code_iridescent_whirlpool.frag.
References anisotropicSpecular(), n(), and PI.
Referenced by anisotropicSpecular(), and iridescentMetal().
| float hash21 | ( | vec2 | p | ) |
Evaluates hash21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 44 of file liquid_code_iridescent_whirlpool.frag.
References hash21().
| vec3 interference | ( | float | phase, |
| float | thickness ) |
Evaluates interference for this shader effect.
| phase | Input value for the calculation. |
| thickness | Input value for the calculation. |
Definition at line 105 of file liquid_code_iridescent_whirlpool.frag.
References interference(), and TAU.
Referenced by effectField(), interference(), iridescentMetal(), main(), main(), and xenolith().
| vec3 iridescentMetal | ( | vec3 | base, |
| vec3 | n, | ||
| vec2 | p, | ||
| float | thickness, | ||
| float | roughness ) |
Evaluates iridescentMetal for this shader effect.
| base | Input value for the calculation. |
| n | Input value for the calculation. |
| p | Input value for the calculation. |
| thickness | Input value for the calculation. |
| roughness | Input value for the calculation. |
Definition at line 200 of file liquid_code_iridescent_whirlpool.frag.
References anisotropicSpecular(), film(), interference(), iridescentMetal(), n(), and time_f.
Referenced by iridescentMetal(), and main().
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file liquid_code_iridescent_whirlpool.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 239 of file liquid_code_iridescent_whirlpool.frag.
References alloy(), amp_high, amp_low, amp_peak, amp_smooth, interference(), iResolution, iridescentMetal(), luminance(), main(), mirrorUV(), n(), refractedTexture(), time_f, toneMap(), turbulentFbm(), whirlpoolHeight(), and whirlpoolNormal().
| vec2 mirrorUV | ( | vec2 | uv | ) |
Evaluates mirrorUV for this shader effect.
| uv | Input value for the calculation. |
Definition at line 95 of file liquid_code_iridescent_whirlpool.frag.
References mirrorUV().
| float noise21 | ( | vec2 | p | ) |
Evaluates noise21 for this shader effect.
| p | Input value for the calculation. |
Definition at line 53 of file liquid_code_iridescent_whirlpool.frag.
| vec3 refractedTexture | ( | vec2 | uv, |
| vec2 | tangent, | ||
| vec2 | normalFlow, | ||
| float | split ) |
Evaluates refractedTexture for this shader effect.
| uv | Input value for the calculation. |
| tangent | Input value for the calculation. |
| normalFlow | Input value for the calculation. |
| split | Input value for the calculation. |
Definition at line 159 of file liquid_code_iridescent_whirlpool.frag.
References mirrorUV(), and refractedTexture().
| 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 84 of file liquid_code_iridescent_whirlpool.frag.
References rotate2().
| vec3 toneMap | ( | vec3 | value | ) |
Evaluates toneMap for this shader effect.
| value | Input value for the calculation. |
Definition at line 231 of file liquid_code_iridescent_whirlpool.frag.
References toneMap().
| float turbulentFbm | ( | vec2 | p | ) |
Evaluates turbulentFbm for this shader effect.
| p | Input value for the calculation. |
Definition at line 66 of file liquid_code_iridescent_whirlpool.frag.
References noise21(), rotation(), and turbulentFbm().
Referenced by main(), turbulentFbm(), and whirlpoolHeight().
| float whirlpoolHeight | ( | vec2 | p | ) |
Evaluates whirlpoolHeight for this shader effect.
| p | Input value for the calculation. |
Definition at line 117 of file liquid_code_iridescent_whirlpool.frag.
References amp_mid, rotate2(), time_f, turbulentFbm(), warp(), and whirlpoolHeight().
Referenced by main(), whirlpoolHeight(), and whirlpoolNormal().
| vec3 whirlpoolNormal | ( | vec2 | p, |
| float | e ) |
Evaluates whirlpoolNormal for this shader effect.
| p | Input value for the calculation. |
| e | Input value for the calculation. |
Definition at line 142 of file liquid_code_iridescent_whirlpool.frag.
References whirlpoolHeight(), and whirlpoolNormal().
Referenced by main(), and whirlpoolNormal().
| ext |
Definition at line 16 of file liquid_code_iridescent_whirlpool.frag.
| const float PI = 3.14159265359 |
Definition at line 36 of file liquid_code_iridescent_whirlpool.frag.
| const float TAU = 6.28318530718 |
Definition at line 37 of file liquid_code_iridescent_whirlpool.frag.