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

Vulkan fragment shader: liquid code chrome nautilus. 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 valueNoise (vec2 p)
 Evaluates valueNoise for this shader effect.
float ridgedFbm (vec2 p)
 Evaluates ridgedFbm for this shader effect.
vec2 rotate2 (vec2 p, float a)
 Evaluates rotate2 for this shader effect.
vec2 mirrorUV (vec2 uv)
 Evaluates mirrorUV for this shader effect.
vec3 thinFilm (float phase)
 Evaluates thinFilm for this shader effect.
float shellHeight (vec2 p)
 Evaluates shellHeight for this shader effect.
vec3 shellNormal (vec2 p, float e)
 Evaluates shellNormal for this shader effect.
vec3 textureAlongShell (vec2 uv, vec2 curl, vec2 normalFlow, float dispersion)
 Evaluates textureAlongShell for this shader effect.
float ggx (float nh, float roughness)
 Evaluates ggx for this shader effect.
vec3 chromeLighting (vec3 base, vec3 n, vec2 p, float phase, float roughness)
 Evaluates chromeLighting 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 chrome nautilus.

Definition in file liquid_code_chrome_nautilus.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 17 of file liquid_code_chrome_nautilus.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 18 of file liquid_code_chrome_nautilus.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 19 of file liquid_code_chrome_nautilus.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 20 of file liquid_code_chrome_nautilus.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 21 of file liquid_code_chrome_nautilus.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 22 of file liquid_code_chrome_nautilus.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 23 of file liquid_code_chrome_nautilus.frag.

Function Documentation

◆ chromeLighting()

vec3 chromeLighting ( vec3 base,
vec3 n,
vec2 p,
float phase,
float roughness )

Evaluates chromeLighting for this shader effect.

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

Definition at line 192 of file liquid_code_chrome_nautilus.frag.

References chromeLighting(), ggx(), n(), thinFilm(), and time_f.

Referenced by chromeLighting(), and main().

◆ ggx()

float ggx ( float nh,
float roughness )

Evaluates ggx for this shader effect.

Parameters
nhInput value for the calculation.
roughnessInput value for the calculation.
Returns
Computed float value.

Definition at line 176 of file liquid_code_chrome_nautilus.frag.

References ggx(), and PI.

Referenced by chromeLighting(), ggx(), ggx(), shade(), and shadeSilver().

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

References hash21().

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

References layout().

◆ 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 96 of file liquid_code_chrome_nautilus.frag.

References mirrorUV().

◆ ridgedFbm()

float ridgedFbm ( vec2 p)

Evaluates ridgedFbm for this shader effect.

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

Definition at line 66 of file liquid_code_chrome_nautilus.frag.

References ridgedFbm(), and valueNoise().

Referenced by main(), ridgedFbm(), and shellHeight().

◆ rotate2()

vec2 rotate2 ( vec2 p,
float a )

Evaluates rotate2 for this shader effect.

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

Definition at line 85 of file liquid_code_chrome_nautilus.frag.

References rotate2().

◆ shellHeight()

float shellHeight ( vec2 p)

Evaluates shellHeight for this shader effect.

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

Definition at line 115 of file liquid_code_chrome_nautilus.frag.

References amp_mid, ridgedFbm(), rotate2(), shellHeight(), and time_f.

Referenced by main(), shellHeight(), and shellNormal().

◆ shellNormal()

vec3 shellNormal ( vec2 p,
float e )

Evaluates shellNormal for this shader effect.

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

Definition at line 140 of file liquid_code_chrome_nautilus.frag.

References shellHeight(), and shellNormal().

Referenced by main(), and shellNormal().

◆ textureAlongShell()

vec3 textureAlongShell ( vec2 uv,
vec2 curl,
vec2 normalFlow,
float dispersion )

Evaluates textureAlongShell for this shader effect.

Parameters
uvInput value for the calculation.
curlInput value for the calculation.
normalFlowInput value for the calculation.
dispersionInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 156 of file liquid_code_chrome_nautilus.frag.

References curl(), mirrorUV(), and textureAlongShell().

Referenced by main(), and textureAlongShell().

◆ thinFilm()

vec3 thinFilm ( float phase)

Evaluates thinFilm for this shader effect.

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

Definition at line 105 of file liquid_code_chrome_nautilus.frag.

References TAU, thinFilm(), and wave().

Referenced by chromeLighting(), lighting(), main(), thinFilm(), and thinFilm().

◆ toneMap()

vec3 toneMap ( vec3 value)

Evaluates toneMap for this shader effect.

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

Definition at line 228 of file liquid_code_chrome_nautilus.frag.

References toneMap().

◆ valueNoise()

float valueNoise ( vec2 p)

Evaluates valueNoise for this shader effect.

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

Definition at line 53 of file liquid_code_chrome_nautilus.frag.

References hash21(), and valueNoise().

Variable Documentation

◆ ext

ext

Definition at line 16 of file liquid_code_chrome_nautilus.frag.

◆ PI

const float PI = 3.14159265359

Definition at line 36 of file liquid_code_chrome_nautilus.frag.

◆ TAU

const float TAU = 6.28318530718

Definition at line 37 of file liquid_code_chrome_nautilus.frag.