Fragment Shader. More...
Public Member Functions | |
out | layout (location=0, index=0) vec4 c |
Output RGBA colours. | |
ivec2 | local_coords (ivec2 it) |
Compute slice block local coordinates for a pixel. | |
ivec2 | global_coords (ivec2 it) |
Compute slice block global coordinates for a pixel. | |
ivec2 | block_coords (int block) |
Look up slice block local coordinates for slice block number. | |
int | block_number_raw (ivec2 it, int level) |
Look up slice block number for slice block local coordinates. | |
int | block_number (ivec2 it) |
Compute best block number for a pixel. | |
int | delta () |
Compute pixel delta for neighbours. | |
ivec2 | quantize_coords (ivec2 it) |
Rejig the coordinates for a pixel so that they are in a computed slice. | |
vec4 | colour (ivec2 it0, ivec2 dims) |
Compute the colour for a pixel. | |
void | main () |
Compute the colour for a pixel, optionally masking glitches. |
Data Fields | |
uniform sampler2D | ida0 |
Raw iteration results texture. | |
uniform usampler2D | slice_number |
Slicing coordinates to number texture. | |
uniform usampler2D | slice_coords |
Slicing number to coordinates texture. | |
uniform bool | update |
Colour uncalculated pixels. | |
uniform bool | update2 |
Use small slice deltas. | |
uniform bool | errs |
Highlight glitches. | |
uniform float | thickness |
Boundary thickness. | |
uniform ivec2 | slicing |
Slicing parameters. | |
smooth in vec2 | t |
Texture coordinate for the current pixel. |
Fragment Shader.
Definition at line 6 of file fp32_colour_frag.glsl.
|
inline |
Look up slice block local coordinates for slice block number.
block | Slice block number. |
Definition at line 120 of file fp32_colour_frag.glsl.
|
inline |
Compute best block number for a pixel.
it | Slice block local coordinates. |
Definition at line 143 of file fp32_colour_frag.glsl.
|
inline |
Look up slice block number for slice block local coordinates.
it | Slice block local coordinates. |
level | Mipmap level. |
Definition at line 133 of file fp32_colour_frag.glsl.
|
inline |
Compute the colour for a pixel.
If errs
is enabled, glitched pixels are highlighted in red.
Unescaped pixels are coloured yellow.
Exterior pixels are coloured using distance estimates. If DE
is enabled, then it uses the distance estimate to colour. If DE
is not enabled, then a fake distance estimate colouring based on neighbouring pixels iteration counts is used. See: http://mathr.co.uk/blog/2014-12-13_faking_distance_estimate_colouring.html
it0 | The texture coordinates. |
dims | The size of the texture. |
Definition at line 228 of file fp32_colour_frag.glsl.
|
inline |
Compute pixel delta for neighbours.
Definition at line 182 of file fp32_colour_frag.glsl.
|
inline |
Compute slice block global coordinates for a pixel.
it | Pixel coordinates. |
Definition at line 108 of file fp32_colour_frag.glsl.
out colour::fp32::frag::layout | ( | location | = 0 , |
index | = 0 |
||
) |
Output RGBA colours.
|
inline |
Compute slice block local coordinates for a pixel.
it | Pixel coordinates. |
Definition at line 95 of file fp32_colour_frag.glsl.
|
inline |
Compute the colour for a pixel, optionally masking glitches.
If errs
is set, just calls colour()
for each pixel. Otherwise, glitched pixels are coloured by merging the colour()
s from non-glitched neighbours – if there are no non-glitched neighbours then use black as a last resort.
Definition at line 304 of file fp32_colour_frag.glsl.
|
inline |
Rejig the coordinates for a pixel so that they are in a computed slice.
it | Pixel coordinates. |
Definition at line 201 of file fp32_colour_frag.glsl.
uniform bool colour::fp32::frag::errs |
Highlight glitches.
true
: highlight glitched pixels in red, colour other pixels normally.
false
: try to mask glitched pixels by blending neighbouring pixels.
Definition at line 62 of file fp32_colour_frag.glsl.
uniform sampler2D colour::fp32::frag::ida0 |
Raw iteration results texture.
Has two semantic formats depending whether DE
is enable:
DE
enabled: vec3(iters, error, de)DE
disabled: vec2(iters, error)iters
is the continuous (smooth) iteration count. Escaped pixels have iters > 0
.
error
is the glitch detection error count (for fpxx
calculations). Glitched pixels have error != 0
.
de
is the distance estimate relative to pixel size. Far exterior pixels have de > 4
.
Definition at line 28 of file fp32_colour_frag.glsl.
uniform usampler2D colour::fp32::frag::slice_coords |
Slicing number to coordinates texture.
Definition at line 38 of file fp32_colour_frag.glsl.
uniform usampler2D colour::fp32::frag::slice_number |
Slicing coordinates to number texture.
Definition at line 33 of file fp32_colour_frag.glsl.
uniform ivec2 colour::fp32::frag::slicing |
smooth in vec2 colour::fp32::frag::t |
Texture coordinate for the current pixel.
Definition at line 82 of file fp32_colour_frag.glsl.
uniform float colour::fp32::frag::thickness |
Boundary thickness.
Lower values give a darker image, high values can make aliasing more visible.
Definition at line 69 of file fp32_colour_frag.glsl.
uniform bool colour::fp32::frag::update |
Colour uncalculated pixels.
false
: discard pixels marked as uncalculated.
Definition at line 45 of file fp32_colour_frag.glsl.
uniform bool colour::fp32::frag::update2 |
Use small slice deltas.
true
: force delta = 1 false
: compute delta based on slice count
Definition at line 53 of file fp32_colour_frag.glsl.