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

Vulkan fragment shader: liquid code molten helix. 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 flowFbm (vec2 p)
 Evaluates flowFbm for this shader effect.
vec2 mirrorUV (vec2 uv)
 Evaluates mirrorUV for this shader effect.
vec3 heatPalette (float x)
 Evaluates heatPalette for this shader effect.
vec3 spectral (float x)
 Evaluates spectral for this shader effect.
float helixPotential (vec2 p)
 Evaluates helixPotential for this shader effect.
vec3 liquidNormal (vec2 p, float e)
 Evaluates liquidNormal for this shader effect.
vec2 helixVelocity (vec2 p)
 Evaluates helixVelocity for this shader effect.
vec3 advectedTexture (vec2 uv, vec2 velocity, vec2 normalDirection, float split)
 Evaluates advectedTexture for this shader effect.
float specularLobe (vec3 n, vec3 v, vec3 l, float power)
 Evaluates specularLobe for this shader effect.
vec3 moltenLighting (vec3 base, vec3 n, vec2 p, float heat)
 Evaluates moltenLighting 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

Detailed Description

Vulkan fragment shader: liquid code molten helix.

Definition in file liquid_code_molten_helix.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 17 of file liquid_code_molten_helix.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 18 of file liquid_code_molten_helix.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 19 of file liquid_code_molten_helix.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 20 of file liquid_code_molten_helix.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 21 of file liquid_code_molten_helix.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 22 of file liquid_code_molten_helix.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 23 of file liquid_code_molten_helix.frag.

Function Documentation

◆ advectedTexture()

vec3 advectedTexture ( vec2 uv,
vec2 velocity,
vec2 normalDirection,
float split )

Evaluates advectedTexture for this shader effect.

Parameters
uvInput value for the calculation.
velocityInput value for the calculation.
normalDirectionInput value for the calculation.
splitInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 182 of file liquid_code_molten_helix.frag.

References advectedTexture(), and mirrorUV().

Referenced by advectedTexture(), and main().

◆ flowFbm()

float flowFbm ( vec2 p)

Evaluates flowFbm for this shader effect.

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

Definition at line 69 of file liquid_code_molten_helix.frag.

References flowFbm(), noise21(), and twist().

Referenced by flowFbm(), helixPotential(), and main().

◆ hash21()

float hash21 ( vec2 p)

Evaluates hash21 for this shader effect.

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

Definition at line 44 of file liquid_code_molten_helix.frag.

References hash21().

◆ heatPalette()

vec3 heatPalette ( float x)

Evaluates heatPalette for this shader effect.

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

Definition at line 95 of file liquid_code_molten_helix.frag.

References heatPalette().

Referenced by heatPalette(), and main().

◆ helixPotential()

float helixPotential ( vec2 p)

Evaluates helixPotential for this shader effect.

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

Definition at line 119 of file liquid_code_molten_helix.frag.

References field(), flowFbm(), helixPotential(), and time_f.

Referenced by helixPotential(), liquidNormal(), and main().

◆ helixVelocity()

vec2 helixVelocity ( vec2 p)

Evaluates helixVelocity for this shader effect.

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

Definition at line 162 of file liquid_code_molten_helix.frag.

References helixVelocity().

Referenced by helixVelocity(), and main().

◆ 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_code_molten_helix.frag.

References layout().

◆ liquidNormal()

vec3 liquidNormal ( vec2 p,
float e )

Evaluates liquidNormal for this shader effect.

Parameters
pInput value for the calculation.
eInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 148 of file liquid_code_molten_helix.frag.

References helixPotential(), and liquidNormal().

Referenced by liquidNormal(), and main().

◆ main()

◆ mirrorUV()

vec2 mirrorUV ( vec2 uv)

Evaluates mirrorUV for this shader effect.

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

Definition at line 86 of file liquid_code_molten_helix.frag.

References mirrorUV().

◆ moltenLighting()

vec3 moltenLighting ( vec3 base,
vec3 n,
vec2 p,
float heat )

Evaluates moltenLighting for this shader effect.

Parameters
baseInput value for the calculation.
nInput value for the calculation.
pInput value for the calculation.
heatInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 215 of file liquid_code_molten_helix.frag.

References moltenLighting(), n(), spectral(), specularLobe(), and time_f.

Referenced by main(), and moltenLighting().

◆ noise21()

float noise21 ( vec2 p)

Evaluates noise21 for this shader effect.

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

Definition at line 55 of file liquid_code_molten_helix.frag.

References cell(), hash21(), and noise21().

◆ spectral()

vec3 spectral ( float x)

Evaluates spectral for this shader effect.

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

Definition at line 110 of file liquid_code_molten_helix.frag.

References spectral(), and TAU.

◆ specularLobe()

float specularLobe ( vec3 n,
vec3 v,
vec3 l,
float power )

Evaluates specularLobe for this shader effect.

Parameters
nInput value for the calculation.
vInput value for the calculation.
lInput value for the calculation.
powerInput value for the calculation.
Returns
Computed float value.

Definition at line 203 of file liquid_code_molten_helix.frag.

References n(), and specularLobe().

Referenced by moltenLighting(), and specularLobe().

◆ toneMap()

vec3 toneMap ( vec3 value)

Evaluates toneMap for this shader effect.

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

Definition at line 241 of file liquid_code_molten_helix.frag.

References toneMap().

Variable Documentation

◆ ext

ext

Definition at line 16 of file liquid_code_molten_helix.frag.

◆ PI

const float PI = 3.14159265359

Definition at line 36 of file liquid_code_molten_helix.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 37 of file liquid_code_molten_helix.frag.