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

Vulkan fragment shader: Liquid Heat. 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
float pingPong (float x, float length)
 Evaluates pingPong 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.
vec3 rotateHue (vec3 col, float angle)
 Evaluates rotateHue for this shader effect.
vec3 getNeonPalette (float t)
 Evaluates getNeonPalette 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.
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 sampleSuperShader (vec2 uv, float t, vec2 center, vec2 res)
 Evaluates sampleSuperShader 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 iHueShift = 0.0
const float iZoom = 1.0
const float iRotation = 0.0

Detailed Description

Vulkan fragment shader: Liquid Heat.

Definition in file Liquid_Heat.frag.

Macro Definition Documentation

◆ iMouse

#define iMouse   ext.mouse

Definition at line 17 of file Liquid_Heat.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 18 of file Liquid_Heat.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 19 of file Liquid_Heat.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 57 of file Liquid_Heat.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 64 of file Liquid_Heat.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 71 of file Liquid_Heat.frag.

References adjustSaturation().

◆ fbm()

float fbm ( vec2 p)

Evaluates fbm for this shader effect.

Parameters
pInput value for the calculation.
Returns
Computed float value.

Definition at line 196 of file Liquid_Heat.frag.

References fbm(), noise(), and rot().

◆ getNeonPalette()

vec3 getNeonPalette ( float t)

Evaluates getNeonPalette for this shader effect.

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

Definition at line 97 of file Liquid_Heat.frag.

References getNeonPalette().

Referenced by getNeonPalette(), sampleLiquid(), sampleMergedLiquid(), and sampleSuperShader().

◆ hash()

float hash ( vec2 p)

Evaluates hash for this shader effect.

Parameters
pInput value for the calculation.
Returns
Computed float value.

Definition at line 174 of file Liquid_Heat.frag.

References hash().

◆ 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 158 of file Liquid_Heat.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 Liquid_Heat.frag.

References layout().

◆ main()

void main ( void )

◆ 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 126 of file Liquid_Heat.frag.

References mxTexture(), and wrapUV().

◆ noise()

float noise ( vec2 p)

Evaluates noise for this shader effect.

Parameters
pInput value for the calculation.
Returns
Computed float value.

Definition at line 183 of file Liquid_Heat.frag.

References hash(), and noise().

◆ pingPong()

float pingPong ( float x,
float length )

Evaluates pingPong for this shader effect.

Parameters
xInput value for the calculation.
lengthInput value for the calculation.
Returns
Computed float value.

Definition at line 46 of file Liquid_Heat.frag.

References pingPong().

◆ 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 145 of file Liquid_Heat.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 81 of file Liquid_Heat.frag.

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

◆ sampleSuperShader()

vec3 sampleSuperShader ( vec2 uv,
float t,
vec2 center,
vec2 res )

Evaluates sampleSuperShader for this shader effect.

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

Definition at line 218 of file Liquid_Heat.frag.

References fbm(), getNeonPalette(), iAmplitude, iFrequency, iRotation, iZoom, kaleido(), mxTexture(), neon(), pingPong(), rotate2D(), sampleSuperShader(), and time_f.

Referenced by main(), and sampleSuperShader().

◆ wrapUV()

vec2 wrapUV ( vec2 tc)

Evaluates wrapUV for this shader effect.

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

Definition at line 115 of file Liquid_Heat.frag.

References wrapUV().

Variable Documentation

◆ ext

ext

Definition at line 16 of file Liquid_Heat.frag.

◆ iAmplitude

const float iAmplitude = 1.0

Definition at line 29 of file Liquid_Heat.frag.

◆ iBrightness

const float iBrightness = 1.0

Definition at line 31 of file Liquid_Heat.frag.

◆ iContrast

const float iContrast = 1.1

Definition at line 32 of file Liquid_Heat.frag.

◆ iFrequency

const float iFrequency = 1.0

Definition at line 30 of file Liquid_Heat.frag.

◆ iHueShift

const float iHueShift = 0.0

Definition at line 34 of file Liquid_Heat.frag.

◆ iRotation

const float iRotation = 0.0

Definition at line 36 of file Liquid_Heat.frag.

◆ iSaturation

const float iSaturation = 1.3

Definition at line 33 of file Liquid_Heat.frag.

◆ iZoom

const float iZoom = 1.0

Definition at line 35 of file Liquid_Heat.frag.