ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
code-frac-x-astral-dream-engine.frag File Reference

Vulkan fragment shader: code-frac-x-astral-dream-engine. 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_rms   ext.u3.z
#define amp_smooth   ext.u3.w
#define iMouse   ext.mouse
#define iResolution   ext.u0.zw
#define iamp   ext.u1.z
#define time_f   ext.u2.y

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (location=0) out vec4 color
 layout (set=0, binding=0) uniform sampler2D samp
mat2 rot (float a)
 Evaluates rot for this shader effect.
float saturate (float x)
 Evaluates saturate for this shader effect.
vec2 saturate (vec2 x)
 Evaluates saturate for this shader effect.
vec3 saturate (vec3 x)
 Evaluates saturate for this shader effect.
vec2 hash22 (vec2 p)
 Evaluates hash22 for this shader effect.
float valueNoise (vec2 p)
 Evaluates valueNoise for this shader effect.
float fbm6 (vec2 p)
 Evaluates fbm6 for this shader effect.
vec2 flowNoise (vec2 p)
 Evaluates flowNoise for this shader effect.
vec2 complexMul (vec2 a, vec2 b)
 Evaluates complexMul for this shader effect.
vec2 complexDiv (vec2 a, vec2 b)
 Evaluates complexDiv for this shader effect.
vec2 kaleido (vec2 p, float segments)
 Evaluates kaleido for this shader effect.
vec2 mirrorWrap (vec2 uv)
 Evaluates mirrorWrap for this shader effect.
vec2 boundedFold (vec2 p)
 Evaluates boundedFold for this shader effect.
float aaLine (float distanceToLine, float halfWidth)
 Evaluates aaLine for this shader effect.
float aaPulse (float phase, float width)
 Evaluates aaPulse for this shader effect.
vec3 cosinePalette (float x)
 Evaluates cosinePalette for this shader effect.
vec4 deepOrbit (vec2 seed, float t, vec4 audio)
 Evaluates deepOrbit for this shader effect.
vec3 sampleTextureHQ (vec2 uv, vec2 direction, float splitPixels)
 Evaluates sampleTextureHQ for this shader effect.
vec2 remixDomain (vec2 p, float t, vec4 audio)
 Evaluates remixDomain for this shader effect.
vec3 remixDetail (vec2 p, vec2 original, float t, vec4 audio, vec4 orbit)
 Evaluates remixDetail for this shader effect.
vec3 screenBlend (vec3 a, vec3 b)
 Evaluates screenBlend for this shader effect.
vec3 filmicToneMap (vec3 x)
 Evaluates filmicToneMap for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const float PI = 3.14159265358979323846
const float TAU = 6.28318530717958647692
const float SEGMENTS = 6.0
const float FOLD_GAIN = 1.340
const float SPIN_RATE = 0.300
const float WARP_STRENGTH = 0.770
const float TEXTURE_MIX = 0.770
const float EXPOSURE = 1.056
const float HUE_SHIFT = 0.741

Detailed Description

Vulkan fragment shader: code-frac-x-astral-dream-engine.

Definition in file code-frac-x-astral-dream-engine.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 13 of file code-frac-x-astral-dream-engine.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 14 of file code-frac-x-astral-dream-engine.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 15 of file code-frac-x-astral-dream-engine.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 16 of file code-frac-x-astral-dream-engine.frag.

◆ amp_rms

#define amp_rms   ext.u3.z

Definition at line 17 of file code-frac-x-astral-dream-engine.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 18 of file code-frac-x-astral-dream-engine.frag.

◆ iamp

#define iamp   ext.u1.z

Definition at line 21 of file code-frac-x-astral-dream-engine.frag.

◆ iMouse

#define iMouse   ext.mouse

Definition at line 19 of file code-frac-x-astral-dream-engine.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 20 of file code-frac-x-astral-dream-engine.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 22 of file code-frac-x-astral-dream-engine.frag.

Function Documentation

◆ aaLine()

float aaLine ( float distanceToLine,
float halfWidth )

Evaluates aaLine for this shader effect.

Parameters
distanceToLineInput value for the calculation.
halfWidthInput value for the calculation.
Returns
Computed float value.

Definition at line 198 of file code-frac-x-astral-dream-engine.frag.

References aaLine(), and iResolution.

Referenced by aaLine(), and remixDetail().

◆ aaPulse()

float aaPulse ( float phase,
float width )

Evaluates aaPulse for this shader effect.

Parameters
phaseInput value for the calculation.
widthInput value for the calculation.
Returns
Computed float value.

Definition at line 209 of file code-frac-x-astral-dream-engine.frag.

References aaPulse(), iResolution, and wave().

Referenced by aaPulse(), and remixDetail().

◆ boundedFold()

vec2 boundedFold ( vec2 p)

Evaluates boundedFold for this shader effect.

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

Definition at line 186 of file code-frac-x-astral-dream-engine.frag.

References boundedFold().

Referenced by boundedFold(), and remixDetail().

◆ complexDiv()

vec2 complexDiv ( vec2 a,
vec2 b )

Evaluates complexDiv for this shader effect.

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

Definition at line 153 of file code-frac-x-astral-dream-engine.frag.

References complexDiv().

Referenced by complexDiv(), and remixDomain().

◆ complexMul()

vec2 complexMul ( vec2 a,
vec2 b )

Evaluates complexMul for this shader effect.

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

Definition at line 143 of file code-frac-x-astral-dream-engine.frag.

References complexMul().

Referenced by complexMul(), remixDetail(), and remixDomain().

◆ cosinePalette()

vec3 cosinePalette ( float x)

Evaluates cosinePalette for this shader effect.

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

Definition at line 220 of file code-frac-x-astral-dream-engine.frag.

References cosinePalette(), frequency, HUE_SHIFT, saturate(), and TAU.

Referenced by cosinePalette(), and main().

◆ deepOrbit()

vec4 deepOrbit ( vec2 seed,
float t,
vec4 audio )

Evaluates deepOrbit for this shader effect.

Parameters
seedInput value for the calculation.
tInput value for the calculation.
audioInput value for the calculation.
Returns
Computed vec4 value.

Definition at line 237 of file code-frac-x-astral-dream-engine.frag.

References deepOrbit(), energy(), FOLD_GAIN, rot(), seed, SPIN_RATE, and TAU.

Referenced by deepOrbit(), and main().

◆ fbm6()

float fbm6 ( vec2 p)

Evaluates fbm6 for this shader effect.

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

Definition at line 115 of file code-frac-x-astral-dream-engine.frag.

References fbm6(), rot(), and valueNoise().

Referenced by fbm6(), flowNoise(), and remixDetail().

◆ filmicToneMap()

vec3 filmicToneMap ( vec3 x)

Evaluates filmicToneMap for this shader effect.

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

Definition at line 350 of file code-frac-x-astral-dream-engine.frag.

References filmicToneMap(), and saturate().

Referenced by filmicToneMap(), and main().

◆ flowNoise()

vec2 flowNoise ( vec2 p)

Evaluates flowNoise for this shader effect.

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

Definition at line 132 of file code-frac-x-astral-dream-engine.frag.

References fbm6(), flowNoise(), and rot().

Referenced by flowNoise(), remixDetail(), and remixDomain().

◆ hash22()

vec2 hash22 ( vec2 p)

Evaluates hash22 for this shader effect.

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

Definition at line 88 of file code-frac-x-astral-dream-engine.frag.

References hash22().

Referenced by cells(), cellular(), compoundSample(), energyField(), hash22(), main(), perceptualField(), skyField(), valueNoise(), voronoi(), and voronoiMetrics().

◆ kaleido()

vec2 kaleido ( vec2 p,
float segments )

Evaluates kaleido for this shader effect.

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

Definition at line 164 of file code-frac-x-astral-dream-engine.frag.

References kaleido(), and TAU.

◆ 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 3 of file code-frac-x-astral-dream-engine.frag.

References layout().

◆ main()

◆ mirrorWrap()

vec2 mirrorWrap ( vec2 uv)

Evaluates mirrorWrap for this shader effect.

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

Definition at line 177 of file code-frac-x-astral-dream-engine.frag.

References mirrorWrap().

Referenced by main(), main(), mirrorWrap(), mirrorWrap(), and sampleTextureHQ().

◆ remixDetail()

vec3 remixDetail ( vec2 p,
vec2 original,
float t,
vec4 audio,
vec4 orbit )

Evaluates remixDetail for this shader effect.

Parameters
pInput value for the calculation.
originalInput value for the calculation.
tInput value for the calculation.
audioInput value for the calculation.
orbitInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 324 of file code-frac-x-astral-dream-engine.frag.

References aaLine(), aaPulse(), remixDetail(), SEGMENTS, TAU, and WARP_STRENGTH.

Referenced by main(), and remixDetail().

◆ remixDomain()

vec2 remixDomain ( vec2 p,
float t,
vec4 audio )

Evaluates remixDomain for this shader effect.

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

Definition at line 297 of file code-frac-x-astral-dream-engine.frag.

References complexDiv(), complexMul(), FOLD_GAIN, kaleido(), remixDomain(), rot(), SEGMENTS, and SPIN_RATE.

Referenced by main(), and remixDomain().

◆ rot()

mat2 rot ( float a)

Evaluates rot for this shader effect.

Parameters
aInput value for the calculation.
Returns
Computed mat2 value.

Definition at line 59 of file code-frac-x-astral-dream-engine.frag.

References rot().

◆ sampleTextureHQ()

vec3 sampleTextureHQ ( vec2 uv,
vec2 direction,
float splitPixels )

Evaluates sampleTextureHQ for this shader effect.

Parameters
uvInput value for the calculation.
directionInput value for the calculation.
splitPixelsInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 266 of file code-frac-x-astral-dream-engine.frag.

References mirrorWrap(), and sampleTextureHQ().

Referenced by main(), and sampleTextureHQ().

◆ saturate() [1/3]

float saturate ( float x)

Evaluates saturate for this shader effect.

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

Definition at line 69 of file code-frac-x-astral-dream-engine.frag.

References saturate().

Referenced by cosinePalette(), filmicToneMap(), main(), remixDetail(), saturate(), saturate(), and saturate().

◆ saturate() [2/3]

vec2 saturate ( vec2 x)

Evaluates saturate for this shader effect.

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

Definition at line 75 of file code-frac-x-astral-dream-engine.frag.

References saturate().

◆ saturate() [3/3]

vec3 saturate ( vec3 x)

Evaluates saturate for this shader effect.

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

Definition at line 81 of file code-frac-x-astral-dream-engine.frag.

References saturate().

◆ screenBlend()

vec3 screenBlend ( vec3 a,
vec3 b )

Evaluates screenBlend for this shader effect.

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

Definition at line 341 of file code-frac-x-astral-dream-engine.frag.

References screenBlend().

Referenced by main(), and screenBlend().

◆ valueNoise()

float valueNoise ( vec2 p)

Evaluates valueNoise for this shader effect.

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

Definition at line 99 of file code-frac-x-astral-dream-engine.frag.

References hash22(), and valueNoise().

Referenced by fbm6(), ridgedFbm(), and valueNoise().

Variable Documentation

◆ EXPOSURE

const float EXPOSURE = 1.056

Definition at line 51 of file code-frac-x-astral-dream-engine.frag.

Referenced by main().

◆ ext

ext

Definition at line 12 of file code-frac-x-astral-dream-engine.frag.

◆ FOLD_GAIN

const float FOLD_GAIN = 1.340

Definition at line 47 of file code-frac-x-astral-dream-engine.frag.

Referenced by deepOrbit(), and remixDomain().

◆ HUE_SHIFT

const float HUE_SHIFT = 0.741

Definition at line 52 of file code-frac-x-astral-dream-engine.frag.

Referenced by cosinePalette(), and remixDetail().

◆ PI

const float PI = 3.14159265358979323846

Definition at line 44 of file code-frac-x-astral-dream-engine.frag.

◆ SEGMENTS

const float SEGMENTS = 6.0

Definition at line 46 of file code-frac-x-astral-dream-engine.frag.

◆ SPIN_RATE

const float SPIN_RATE = 0.300

Definition at line 48 of file code-frac-x-astral-dream-engine.frag.

Referenced by deepOrbit(), main(), and remixDomain().

◆ TAU

const float TAU = 6.28318530717958647692

Definition at line 45 of file code-frac-x-astral-dream-engine.frag.

◆ TEXTURE_MIX

const float TEXTURE_MIX = 0.770

Definition at line 50 of file code-frac-x-astral-dream-engine.frag.

Referenced by main().

◆ WARP_STRENGTH

const float WARP_STRENGTH = 0.770