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

Vulkan fragment shader: fractal. 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 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) in vec2 tc
 layout (set=0, binding=0) uniform sampler2D samp
float rand (vec2 co)
 Evaluates rand for this shader effect.
vec2 screenToComplex (vec2 screenPos, vec2 center, float zoom)
 Evaluates screenToComplex for this shader effect.
int mandelbrot (vec2 c)
 Evaluates mandelbrot for this shader effect.
vec4 xor_RGB (vec4 icolor, vec4 isourcex)
 Evaluates xor RGB for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext
const int maxIterations = 300

Detailed Description

Vulkan fragment shader: fractal.

Definition in file fractal.frag.

Macro Definition Documentation

◆ amp_high

#define amp_high   ext.audio_bands.z

Definition at line 17 of file fractal.frag.

◆ amp_low

#define amp_low   ext.audio_bands.x

Definition at line 18 of file fractal.frag.

◆ amp_mid

#define amp_mid   ext.audio_bands.y

Definition at line 19 of file fractal.frag.

◆ amp_peak

#define amp_peak   ext.u2.w

Definition at line 20 of file fractal.frag.

◆ amp_rms

#define amp_rms   ext.u3.z

Definition at line 21 of file fractal.frag.

◆ amp_smooth

#define amp_smooth   ext.u3.w

Definition at line 22 of file fractal.frag.

◆ iamp

#define iamp   ext.u1.z

Definition at line 24 of file fractal.frag.

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 23 of file fractal.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 25 of file fractal.frag.

Function Documentation

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

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 102 of file fractal.frag.

References amp_high, amp_low, amp_peak, iResolution, main(), mandelbrot(), maxIterations, n(), rand(), screenToComplex(), time_f, and xor_RGB().

◆ mandelbrot()

int mandelbrot ( vec2 c)

Evaluates mandelbrot for this shader effect.

Parameters
cInput value for the calculation.
Returns
Computed int value.

Definition at line 67 of file fractal.frag.

References mandelbrot(), maxIterations, and n().

Referenced by main(), and mandelbrot().

◆ rand()

float rand ( vec2 co)

Evaluates rand for this shader effect.

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

Definition at line 45 of file fractal.frag.

References rand().

◆ screenToComplex()

vec2 screenToComplex ( vec2 screenPos,
vec2 center,
float zoom )

Evaluates screenToComplex for this shader effect.

Parameters
screenPosInput value for the calculation.
centerInput value for the calculation.
zoomInput value for the calculation.
Returns
Computed vec2 value.

Definition at line 56 of file fractal.frag.

References iResolution, and screenToComplex().

Referenced by main(), and screenToComplex().

◆ xor_RGB()

vec4 xor_RGB ( vec4 icolor,
vec4 isourcex )

Evaluates xor RGB for this shader effect.

Parameters
icolorInput value for the calculation.
isourcexInput value for the calculation.
Returns
Computed vec4 value.

Definition at line 84 of file fractal.frag.

References xor_RGB().

Variable Documentation

◆ ext

ext

Definition at line 16 of file fractal.frag.

◆ maxIterations

const int maxIterations = 300

Definition at line 60 of file fractal.frag.

Referenced by fractal(), fractal(), main(), and mandelbrot().