ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
halluc_gem.frag File Reference

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

Detailed Description

Vulkan fragment shader: halluc gem.

Definition in file halluc_gem.frag.

Macro Definition Documentation

◆ iMouse

#define iMouse   ext.mouse

Definition at line 17 of file halluc_gem.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 18 of file halluc_gem.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 19 of file halluc_gem.frag.

Function Documentation

◆ adjustBrightness()

vec3 adjustBrightness ( vec3 col,
float b )

Evaluates adjustBrightness for this shader effect.

Parameters
colInput value for the calculation.
bInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 46 of file halluc_gem.frag.

References adjustBrightness().

◆ adjustContrast()

vec3 adjustContrast ( vec3 col,
float c )

Evaluates adjustContrast for this shader effect.

Parameters
colInput value for the calculation.
cInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 56 of file halluc_gem.frag.

References adjustContrast().

◆ adjustSaturation()

vec3 adjustSaturation ( vec3 col,
float s )

Evaluates adjustSaturation for this shader effect.

Parameters
colInput value for the calculation.
sInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 66 of file halluc_gem.frag.

References adjustSaturation().

◆ applyColorAdjustments()

vec3 applyColorAdjustments ( vec3 col)

Evaluates applyColorAdjustments for this shader effect.

Parameters
colInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 99 of file halluc_gem.frag.

References adjustBrightness(), adjustContrast(), adjustSaturation(), applyColorAdjustments(), iBrightness, iContrast, iHueShift, iSaturation, and rotateHue().

◆ applyZoomRotation()

vec2 applyZoomRotation ( vec2 uv,
vec2 center )

Evaluates applyZoomRotation for this shader effect.

Parameters
uvInput value for the calculation.
centerInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 113 of file halluc_gem.frag.

References applyZoomRotation(), iRotation, and iZoom.

◆ kaleido()

vec2 kaleido ( vec2 p,
float slices )

Evaluates kaleido for this shader effect.

Parameters
pInput value for the calculation.
slicesInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 176 of file halluc_gem.frag.

References kaleido().

◆ layout() [1/3]

layout ( location = 0)

References layout().

◆ layout() [2/3]

layout ( set = 0,
binding = 0 )

References layout().

◆ layout() [3/3]

layout ( set = 0,
binding = 1,
std140  )

Definition at line 7 of file halluc_gem.frag.

References layout().

◆ main()

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().

◆ mxTexture()

vec4 mxTexture ( sampler2D tex,
vec2 tc )

Evaluates mxTexture for this shader effect.

Parameters
texInput value for the calculation.
tcInput value for the calculation.
Returns
Computed vec4 value.

Definition at line 139 of file halluc_gem.frag.

References mxTexture(), and wrapUV().

◆ rotate2D()

vec2 rotate2D ( vec2 p,
float a )

Evaluates rotate2D for this shader effect.

Parameters
pInput value for the calculation.
aInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 164 of file halluc_gem.frag.

References rotate2D().

◆ rotateHue()

vec3 rotateHue ( vec3 col,
float angle )

Evaluates rotateHue for this shader effect.

Parameters
colInput value for the calculation.
angleInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 77 of file halluc_gem.frag.

References R(), rotateHue(), and W().

◆ sampleFractal()

vec3 sampleFractal ( vec2 uv,
float t,
float strength,
vec2 center,
vec2 res )

Evaluates sampleFractal for this shader effect.

Parameters
uvInput value for the calculation.
tInput value for the calculation.
strengthInput value for the calculation.
centerInput value for the calculation.
resInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 196 of file halluc_gem.frag.

References iAmplitude, iFrequency, kaleido(), mxTexture(), rotate2D(), sampleFractal(), and strength.

Referenced by main(), and sampleFractal().

◆ wrapUV()

vec2 wrapUV ( vec2 tc)

Evaluates wrapUV for this shader effect.

Parameters
tcInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 129 of file halluc_gem.frag.

References wrapUV().

Variable Documentation

◆ ext

ext

Definition at line 16 of file halluc_gem.frag.

◆ iAmplitude

const float iAmplitude = 1.0

Definition at line 29 of file halluc_gem.frag.

◆ iBrightness

const float iBrightness = 1.0

Definition at line 31 of file halluc_gem.frag.

◆ iContrast

const float iContrast = 1.0

Definition at line 32 of file halluc_gem.frag.

◆ iFrequency

const float iFrequency = 1.0

Definition at line 30 of file halluc_gem.frag.

◆ iHueShift

const float iHueShift = 0.0

Definition at line 34 of file halluc_gem.frag.

◆ iRotation

const float iRotation = 0.0

Definition at line 36 of file halluc_gem.frag.

◆ iSaturation

const float iSaturation = 1.0

Definition at line 33 of file halluc_gem.frag.

◆ iZoom

const float iZoom = 1.0

Definition at line 35 of file halluc_gem.frag.