ACMX Vulkan Shader Library
GLSL 4.50 shader effects for ACMX's Vulkan renderer
Loading...
Searching...
No Matches
gem-hue-frac-spectrum16.frag File Reference

Vulkan fragment shader: gem-hue-frac-spectrum16. More...

Go to the source code of this file.

Macros

#define iResolution   ext.u0.zw
#define spectrum_history_head   int(ext.audio_history.x)
#define spectrum_history_size   int(ext.audio_history.y)
#define time_f   ext.u2.y
#define SPECTRUM_HISTORY_LAYER(index)

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (location=0) in vec2 tc
 layout (set=0, binding=0) uniform sampler2D samp
float sampleHistory (int index, float freq)
 Evaluates sampleHistory for this shader effect.
float pingPong (float x, float length)
 Evaluates pingPong for this shader effect.
vec3 hueShift (vec3 col, float hue)
 Evaluates hueShift for this shader effect.
void main ()
 Executes the fragment shader entry point.

Variables

 ext

Detailed Description

Vulkan fragment shader: gem-hue-frac-spectrum16.

Definition in file gem-hue-frac-spectrum16.frag.

Macro Definition Documentation

◆ iResolution

#define iResolution   ext.u0.zw

Definition at line 17 of file gem-hue-frac-spectrum16.frag.

◆ spectrum_history_head

#define spectrum_history_head   int(ext.audio_history.x)

Definition at line 18 of file gem-hue-frac-spectrum16.frag.

◆ SPECTRUM_HISTORY_LAYER

#define SPECTRUM_HISTORY_LAYER ( index)
Value:
#define spectrum_history_head
#define spectrum_history_size

Definition at line 34 of file gem-hue-frac-spectrum16.frag.

◆ spectrum_history_size

#define spectrum_history_size   int(ext.audio_history.y)

Definition at line 19 of file gem-hue-frac-spectrum16.frag.

◆ time_f

#define time_f   ext.u2.y

Definition at line 20 of file gem-hue-frac-spectrum16.frag.

Function Documentation

◆ hueShift()

vec3 hueShift ( vec3 col,
float hue )

Evaluates hueShift for this shader effect.

Parameters
colInput value for the calculation.
hueInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 82 of file gem-hue-frac-spectrum16.frag.

References hue(), and hueShift().

Referenced by hueShift(), hueShift(), hueShift(), main(), 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 gem-hue-frac-spectrum16.frag.

References layout().

◆ main()

void main ( void )

Executes the fragment shader entry point.

Definition at line 91 of file gem-hue-frac-spectrum16.frag.

References hueShift(), iResolution, main(), pingPong(), sampleHistory(), and time_f.

◆ 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 71 of file gem-hue-frac-spectrum16.frag.

References pingPong().

◆ sampleHistory()

float sampleHistory ( int index,
float freq )

Evaluates sampleHistory for this shader effect.

Parameters
indexInput value for the calculation.
freqInput value for the calculation.
Returns
Computed float value.

Definition at line 44 of file gem-hue-frac-spectrum16.frag.

References sampleHistory(), and SPECTRUM_HISTORY_LAYER.

Variable Documentation

◆ ext

ext

Definition at line 16 of file gem-hue-frac-spectrum16.frag.