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

Vulkan compute shader: acidcam 005 temporal blend cache. More...

Go to the source code of this file.

Macros

#define alpha   ext.u0.x
#define history_head   int(ext.u3.x)
#define iFrame   int(ext.u2.x)
#define SIZE   8
#define USE_HISTORY_TEXTURE_ARRAY   1

Functions

 layout (set=0, binding=1, std140) uniform SpriteExtended
 layout (local_size_x=16, local_size_y=16) in
 layout (set=0, binding=5, rgba8) writeonly uniform image2D outputImage
 layout (set=0, binding=0) uniform sampler2D samp
ivec2 clampPos (ivec2 p, ivec2 size)
 Evaluates clampPos for this shader effect.
vec2 pixelUv (ivec2 p, ivec2 size)
 Evaluates pixelUv for this shader effect.
vec3 sampleSource (ivec2 p, ivec2 size)
 Evaluates sampleSource for this shader effect.
int effectBlockSize ()
 Evaluates effectBlockSize for this shader effect.
int effectDirection ()
 Evaluates effectDirection for this shader effect.
int effectHistoryIndex ()
 Evaluates effectHistoryIndex for this shader effect.
vec3 sampleHistory (int index, ivec2 p, ivec2 size)
 Evaluates sampleHistory for this shader effect.
vec3 temporalBlend (ivec2 p, ivec2 size)
 Evaluates temporalBlend for this shader effect.
void main ()
 Executes the compute shader entry point.

Variables

 ext

Detailed Description

Vulkan compute shader: acidcam 005 temporal blend cache.

Definition in file acidcam_005_temporal_blend_cache.comp.

Macro Definition Documentation

◆ alpha

#define alpha   ext.u0.x

Definition at line 17 of file acidcam_005_temporal_blend_cache.comp.

◆ history_head

#define history_head   int(ext.u3.x)

Definition at line 18 of file acidcam_005_temporal_blend_cache.comp.

◆ iFrame

#define iFrame   int(ext.u2.x)

Definition at line 19 of file acidcam_005_temporal_blend_cache.comp.

◆ SIZE

#define SIZE   8

Definition at line 75 of file acidcam_005_temporal_blend_cache.comp.

◆ USE_HISTORY_TEXTURE_ARRAY

#define USE_HISTORY_TEXTURE_ARRAY   1

Definition at line 79 of file acidcam_005_temporal_blend_cache.comp.

Function Documentation

◆ clampPos()

ivec2 clampPos ( ivec2 p,
ivec2 size )

Evaluates clampPos for this shader effect.

Parameters
pInput value for the calculation.
sizeInput value for the calculation.
Returns
Computed ivec2 value.

Definition at line 34 of file acidcam_005_temporal_blend_cache.comp.

References clampPos().

◆ effectBlockSize()

int effectBlockSize ( )

Evaluates effectBlockSize for this shader effect.

Returns
Computed int value.

Definition at line 62 of file acidcam_005_temporal_blend_cache.comp.

References alpha, and effectBlockSize().

◆ effectDirection()

int effectDirection ( )

Evaluates effectDirection for this shader effect.

Returns
Computed int value.

Definition at line 70 of file acidcam_005_temporal_blend_cache.comp.

References effectDirection(), and iFrame.

Referenced by blockShuffle(), brightnessContrast(), dynamicKaleidoscope(), effectDirection(), main(), scanlineWarp(), temporalBlend(), wave(), and xorGrid().

◆ effectHistoryIndex()

int effectHistoryIndex ( )

Evaluates effectHistoryIndex for this shader effect.

Returns
Computed int value.

Definition at line 93 of file acidcam_005_temporal_blend_cache.comp.

References effectHistoryIndex(), iFrame, and SIZE.

◆ layout() [1/4]

layout ( local_size_x = 16,
local_size_y = 16 )

References layout().

◆ layout() [2/4]

layout ( set = 0,
binding = 0 )

References layout().

◆ layout() [3/4]

layout ( set = 0,
binding = 1,
std140  )

Definition at line 7 of file acidcam_005_temporal_blend_cache.comp.

References layout().

◆ layout() [4/4]

layout ( set = 0,
binding = 5,
rgba8  )

References layout().

◆ main()

void main ( void )

Executes the compute shader entry point.

Definition at line 132 of file acidcam_005_temporal_blend_cache.comp.

References main(), and temporalBlend().

◆ pixelUv()

vec2 pixelUv ( ivec2 p,
ivec2 size )

Evaluates pixelUv for this shader effect.

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

Definition at line 44 of file acidcam_005_temporal_blend_cache.comp.

References clampPos(), and pixelUv().

◆ sampleHistory()

vec3 sampleHistory ( int index,
ivec2 p,
ivec2 size )

Evaluates sampleHistory for this shader effect.

Parameters
indexInput value for the calculation.
pInput value for the calculation.
sizeInput value for the calculation.
Returns
Computed vec3 value.

Definition at line 104 of file acidcam_005_temporal_blend_cache.comp.

References history_head, pixelUv(), sampleHistory(), and SIZE.

◆ sampleSource()

vec3 sampleSource ( ivec2 p,
ivec2 size )

Evaluates sampleSource for this shader effect.

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

Definition at line 54 of file acidcam_005_temporal_blend_cache.comp.

References pixelUv(), and sampleSource().

◆ temporalBlend()

vec3 temporalBlend ( ivec2 p,
ivec2 size )

Evaluates temporalBlend for this shader effect.

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

Definition at line 121 of file acidcam_005_temporal_blend_cache.comp.

References effectBlockSize(), effectDirection(), effectHistoryIndex(), sampleHistory(), sampleSource(), and temporalBlend().

Referenced by main(), and temporalBlend().

Variable Documentation

◆ ext

ext

Definition at line 16 of file acidcam_005_temporal_blend_cache.comp.