Vulkan compute shader: xorblend cache. More...
Go to the source code of this file.
Macros | |
| #define | history_head int(ext.u3.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. | |
| uvec3 | toU8 (vec3 color) |
| Evaluates toU8 for this shader effect. | |
| vec3 | toRGB (uvec3 color) |
| Evaluates toRGB for this shader effect. | |
| uvec3 | sampleSourceU8 (ivec2 p, ivec2 size) |
| Evaluates sampleSourceU8 for this shader effect. | |
| vec3 | sampleHistory (int index, ivec2 p, ivec2 size) |
| Evaluates sampleHistory for this shader effect. | |
| uvec3 | sampleHistoryU8 (int index, ivec2 p, ivec2 size) |
| Evaluates sampleHistoryU8 for this shader effect. | |
| vec3 | xorHistory (ivec2 p, ivec2 size) |
| Evaluates xorHistory for this shader effect. | |
| void | main () |
| Executes the compute shader entry point. | |
Variables | |
| ext | |
| const float | INV_255 = 1.0 / 255.0 |
Vulkan compute shader: xorblend cache.
Definition in file xorblend_cache.comp.
| #define history_head int(ext.u3.x) |
Definition at line 17 of file xorblend_cache.comp.
| #define SIZE 8 |
Definition at line 85 of file xorblend_cache.comp.
| #define USE_HISTORY_TEXTURE_ARRAY 1 |
Definition at line 89 of file xorblend_cache.comp.
| ivec2 clampPos | ( | ivec2 | p, |
| ivec2 | size ) |
Evaluates clampPos for this shader effect.
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 32 of file xorblend_cache.comp.
References clampPos().
| layout | ( | local_size_x | = 16, |
| local_size_y | = 16 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 0 ) |
References layout().
| layout | ( | set | = 0, |
| binding | = 1, | ||
| std140 | ) |
Definition at line 7 of file xorblend_cache.comp.
References layout().
| layout | ( | set | = 0, |
| binding | = 5, | ||
| rgba8 | ) |
References layout().
| void main | ( | void | ) |
Executes the compute shader entry point.
Definition at line 145 of file xorblend_cache.comp.
References main(), and xorHistory().
| vec2 pixelUv | ( | ivec2 | p, |
| ivec2 | size ) |
Evaluates pixelUv for this shader effect.
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 42 of file xorblend_cache.comp.
References clampPos(), and pixelUv().
| vec3 sampleHistory | ( | int | index, |
| ivec2 | p, | ||
| ivec2 | size ) |
Evaluates sampleHistory for this shader effect.
| index | Input value for the calculation. |
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 106 of file xorblend_cache.comp.
References history_head, pixelUv(), sampleHistory(), and SIZE.
| uvec3 sampleHistoryU8 | ( | int | index, |
| ivec2 | p, | ||
| ivec2 | size ) |
Evaluates sampleHistoryU8 for this shader effect.
| index | Input value for the calculation. |
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 124 of file xorblend_cache.comp.
References sampleHistory(), sampleHistoryU8(), and toU8().
| vec3 sampleSource | ( | ivec2 | p, |
| ivec2 | size ) |
Evaluates sampleSource for this shader effect.
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 52 of file xorblend_cache.comp.
References pixelUv(), and sampleSource().
| uvec3 sampleSourceU8 | ( | ivec2 | p, |
| ivec2 | size ) |
Evaluates sampleSourceU8 for this shader effect.
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 80 of file xorblend_cache.comp.
References sampleSource(), sampleSourceU8(), and toU8().
| vec3 toRGB | ( | uvec3 | color | ) |
Evaluates toRGB for this shader effect.
| color | Input value for the calculation. |
Definition at line 70 of file xorblend_cache.comp.
| uvec3 toU8 | ( | vec3 | color | ) |
Evaluates toU8 for this shader effect.
| color | Input value for the calculation. |
Definition at line 61 of file xorblend_cache.comp.
References toU8().
| vec3 xorHistory | ( | ivec2 | p, |
| ivec2 | size ) |
Evaluates xorHistory for this shader effect.
| p | Input value for the calculation. |
| size | Input value for the calculation. |
Definition at line 134 of file xorblend_cache.comp.
References sampleHistoryU8(), sampleSourceU8(), SIZE, toRGB(), and xorHistory().
Referenced by main(), and xorHistory().
| ext |
Definition at line 16 of file xorblend_cache.comp.
| const float INV_255 = 1.0 / 255.0 |
Definition at line 24 of file xorblend_cache.comp.