Vulkan fragment shader: Light Rainbow Swirl. More...
Go to the source code of this file.
Macros | |
| #define | iMouse ext.mouse |
| #define | iResolution ext.u0.zw |
| #define | time_f ext.u2.y |
Functions | |
| layout (set=0, binding=1, std140) uniform SpriteExtended | |
| layout (location=0) out vec4 color | |
| layout (set=0, binding=0) uniform sampler2D samp | |
| vec3 | rainbow (float t) |
| Evaluates rainbow for this shader effect. | |
| vec3 | adjustBrightness (vec3 col, float b) |
| Evaluates adjustBrightness for this shader effect. | |
| vec3 | adjustContrast (vec3 col, float c) |
| Evaluates adjustContrast for this shader effect. | |
| vec3 | adjustSaturation (vec3 col, float s) |
| Evaluates adjustSaturation for this shader effect. | |
| vec2 | wrapUV (vec2 tc) |
| Evaluates wrapUV for this shader effect. | |
| vec4 | mxTexture (sampler2D tex, vec2 tc) |
| Evaluates mxTexture for this shader effect. | |
| vec2 | rotate2D (vec2 p, float a) |
| Evaluates rotate2D for this shader effect. | |
| float | hash (vec2 p) |
| Evaluates hash for this shader effect. | |
| float | noise (vec2 p) |
| Evaluates noise for this shader effect. | |
| float | fbm (vec2 p) |
| Evaluates fbm for this shader effect. | |
| vec3 | sampleMergedLiquid (vec2 uv, float t, float strength, vec2 center, vec2 res) |
| Evaluates sampleMergedLiquid for this shader effect. | |
| void | main () |
| Executes the fragment shader entry point. | |
Variables | |
| ext | |
| const float | iAmplitude = 1.0 |
| const float | iFrequency = 1.0 |
| const float | iBrightness = 1.0 |
| const float | iContrast = 1.1 |
| const float | iSaturation = 1.3 |
| const float | iZoom = 1.0 |
| const float | iRotation = 0.0 |
| const float | PI = 3.14159 |
Vulkan fragment shader: Light Rainbow Swirl.
Definition in file Light_Rainbow_Swirl.frag.
| #define iMouse ext.mouse |
Definition at line 17 of file Light_Rainbow_Swirl.frag.
| #define iResolution ext.u0.zw |
Definition at line 18 of file Light_Rainbow_Swirl.frag.
| #define time_f ext.u2.y |
Definition at line 19 of file Light_Rainbow_Swirl.frag.
| vec3 adjustBrightness | ( | vec3 | col, |
| float | b ) |
Evaluates adjustBrightness for this shader effect.
| col | Input value for the calculation. |
| b | Input value for the calculation. |
Definition at line 60 of file Light_Rainbow_Swirl.frag.
References adjustBrightness().
| vec3 adjustContrast | ( | vec3 | col, |
| float | c ) |
Evaluates adjustContrast for this shader effect.
| col | Input value for the calculation. |
| c | Input value for the calculation. |
Definition at line 67 of file Light_Rainbow_Swirl.frag.
References adjustContrast().
| vec3 adjustSaturation | ( | vec3 | col, |
| float | s ) |
Evaluates adjustSaturation for this shader effect.
| col | Input value for the calculation. |
| s | Input value for the calculation. |
Definition at line 74 of file Light_Rainbow_Swirl.frag.
References adjustSaturation().
| float fbm | ( | vec2 | p | ) |
Evaluates fbm for this shader effect.
| p | Input value for the calculation. |
Definition at line 141 of file Light_Rainbow_Swirl.frag.
| float hash | ( | vec2 | p | ) |
Evaluates hash for this shader effect.
| p | Input value for the calculation. |
Definition at line 119 of file Light_Rainbow_Swirl.frag.
References hash().
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file Light_Rainbow_Swirl.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 223 of file Light_Rainbow_Swirl.frag.
References adjustBrightness(), adjustContrast(), adjustSaturation(), iAmplitude, iBrightness, iContrast, iFrequency, iMouse, iResolution, iSaturation, main(), sampleMergedLiquid(), strength, time_f, and wrapUV().
| vec4 mxTexture | ( | sampler2D | tex, |
| vec2 | tc ) |
Evaluates mxTexture for this shader effect.
| tex | Input value for the calculation. |
| tc | Input value for the calculation. |
Definition at line 94 of file Light_Rainbow_Swirl.frag.
References mxTexture(), and wrapUV().
| float noise | ( | vec2 | p | ) |
Evaluates noise for this shader effect.
| p | Input value for the calculation. |
Definition at line 128 of file Light_Rainbow_Swirl.frag.
| vec3 rainbow | ( | float | t | ) |
Evaluates rainbow for this shader effect.
| t | Input value for the calculation. |
Definition at line 44 of file Light_Rainbow_Swirl.frag.
References rainbow().
| vec2 rotate2D | ( | vec2 | p, |
| float | a ) |
Evaluates rotate2D for this shader effect.
| p | Input value for the calculation. |
| a | Input value for the calculation. |
Definition at line 108 of file Light_Rainbow_Swirl.frag.
References rotate2D().
| vec3 sampleMergedLiquid | ( | vec2 | uv, |
| float | t, | ||
| float | strength, | ||
| vec2 | center, | ||
| vec2 | res ) |
Evaluates sampleMergedLiquid for this shader effect.
| uv | Input value for the calculation. |
| t | Input value for the calculation. |
| strength | Input value for the calculation. |
| center | Input value for the calculation. |
| res | Input value for the calculation. |
Definition at line 164 of file Light_Rainbow_Swirl.frag.
References fbm(), iAmplitude, iRotation, iZoom, mxTexture(), PI, rainbow(), rotate2D(), sampleMergedLiquid(), spiralTwist(), and strength.
Referenced by main(), and sampleMergedLiquid().
| vec2 wrapUV | ( | vec2 | tc | ) |
Evaluates wrapUV for this shader effect.
| tc | Input value for the calculation. |
Definition at line 84 of file Light_Rainbow_Swirl.frag.
References wrapUV().
| ext |
Definition at line 16 of file Light_Rainbow_Swirl.frag.
| const float iAmplitude = 1.0 |
Definition at line 29 of file Light_Rainbow_Swirl.frag.
| const float iBrightness = 1.0 |
Definition at line 31 of file Light_Rainbow_Swirl.frag.
| const float iContrast = 1.1 |
Definition at line 32 of file Light_Rainbow_Swirl.frag.
| const float iFrequency = 1.0 |
Definition at line 30 of file Light_Rainbow_Swirl.frag.
| const float iRotation = 0.0 |
Definition at line 35 of file Light_Rainbow_Swirl.frag.
| const float iSaturation = 1.3 |
Definition at line 33 of file Light_Rainbow_Swirl.frag.
| const float iZoom = 1.0 |
Definition at line 34 of file Light_Rainbow_Swirl.frag.
| const float PI = 3.14159 |
Definition at line 36 of file Light_Rainbow_Swirl.frag.