Vulkan fragment shader: halluc gem. 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 (set=0, binding=0) uniform sampler2D samp | |
| layout (location=0) out vec4 color | |
| 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. | |
| vec3 | rotateHue (vec3 col, float angle) |
| Evaluates rotateHue for this shader effect. | |
| vec3 | applyColorAdjustments (vec3 col) |
| Evaluates applyColorAdjustments for this shader effect. | |
| vec2 | applyZoomRotation (vec2 uv, vec2 center) |
| Evaluates applyZoomRotation 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. | |
| vec2 | kaleido (vec2 p, float slices) |
| Evaluates kaleido for this shader effect. | |
| vec3 | sampleFractal (vec2 uv, float t, float strength, vec2 center, vec2 res) |
| Evaluates sampleFractal 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.0 |
| const float | iSaturation = 1.0 |
| const float | iHueShift = 0.0 |
| const float | iZoom = 1.0 |
| const float | iRotation = 0.0 |
Vulkan fragment shader: halluc gem.
Definition in file halluc_gem.frag.
| #define iMouse ext.mouse |
Definition at line 17 of file halluc_gem.frag.
| #define iResolution ext.u0.zw |
Definition at line 18 of file halluc_gem.frag.
| #define time_f ext.u2.y |
Definition at line 19 of file halluc_gem.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 46 of file halluc_gem.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 56 of file halluc_gem.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 66 of file halluc_gem.frag.
References adjustSaturation().
| vec3 applyColorAdjustments | ( | vec3 | col | ) |
Evaluates applyColorAdjustments for this shader effect.
| col | Input value for the calculation. |
Definition at line 99 of file halluc_gem.frag.
References adjustBrightness(), adjustContrast(), adjustSaturation(), applyColorAdjustments(), iBrightness, iContrast, iHueShift, iSaturation, and rotateHue().
| vec2 applyZoomRotation | ( | vec2 | uv, |
| vec2 | center ) |
Evaluates applyZoomRotation for this shader effect.
| uv | Input value for the calculation. |
| center | Input value for the calculation. |
Definition at line 113 of file halluc_gem.frag.
References applyZoomRotation(), iRotation, and iZoom.
| vec2 kaleido | ( | vec2 | p, |
| float | slices ) |
Evaluates kaleido for this shader effect.
| p | Input value for the calculation. |
| slices | Input value for the calculation. |
Definition at line 176 of file halluc_gem.frag.
References kaleido().
| layout | ( | location | = 0 | ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file halluc_gem.frag.
References layout().
| void main | ( | void | ) |
Executes the fragment shader entry point.
Definition at line 244 of file halluc_gem.frag.
References applyColorAdjustments(), applyZoomRotation(), iAmplitude, iMouse, iResolution, main(), sampleFractal(), 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 139 of file halluc_gem.frag.
References mxTexture(), and wrapUV().
| 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 164 of file halluc_gem.frag.
References rotate2D().
| vec3 rotateHue | ( | vec3 | col, |
| float | angle ) |
Evaluates rotateHue for this shader effect.
| col | Input value for the calculation. |
| angle | Input value for the calculation. |
Definition at line 77 of file halluc_gem.frag.
References R(), rotateHue(), and W().
| vec3 sampleFractal | ( | vec2 | uv, |
| float | t, | ||
| float | strength, | ||
| vec2 | center, | ||
| vec2 | res ) |
Evaluates sampleFractal 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 196 of file halluc_gem.frag.
References iAmplitude, iFrequency, kaleido(), mxTexture(), rotate2D(), sampleFractal(), and strength.
Referenced by main(), and sampleFractal().
| vec2 wrapUV | ( | vec2 | tc | ) |
Evaluates wrapUV for this shader effect.
| tc | Input value for the calculation. |
Definition at line 129 of file halluc_gem.frag.
References wrapUV().
| ext |
Definition at line 16 of file halluc_gem.frag.
| const float iAmplitude = 1.0 |
Definition at line 29 of file halluc_gem.frag.
| const float iBrightness = 1.0 |
Definition at line 31 of file halluc_gem.frag.
| const float iContrast = 1.0 |
Definition at line 32 of file halluc_gem.frag.
| const float iFrequency = 1.0 |
Definition at line 30 of file halluc_gem.frag.
| const float iHueShift = 0.0 |
Definition at line 34 of file halluc_gem.frag.
| const float iRotation = 0.0 |
Definition at line 36 of file halluc_gem.frag.
| const float iSaturation = 1.0 |
Definition at line 33 of file halluc_gem.frag.
| const float iZoom = 1.0 |
Definition at line 35 of file halluc_gem.frag.