Changed 'glow' to 'bloom' to match terminology used elsewhere. Tweaked shader to alter line width based on brightness.

This commit is contained in:
grolliffe 2020-09-16 10:47:54 +01:00
parent 51bd48718b
commit 59266d2cb1
2 changed files with 4 additions and 4 deletions

6
dots.h
View File

@ -35,9 +35,9 @@ uint8_t DotImage[1024] = {
0, 1, 2, 3, 7, 11, 16, 20, 26, 30, 35, 41, 45, 49, 51, 52, 52, 51, 49, 45, 41, 35, 30, 26, 20, 16, 11, 7, 3, 2, 1, 0,
};
uint32_t GlowWidth = 32;
uint32_t GlowHeight = 32;
uint8_t GlowImage[1024] = {
uint32_t BloomWidth = 32;
uint32_t BloomHeight = 32;
uint8_t BloomImage[1024] = {
0, 0, 0, 0, 2, 2, 3, 4, 5, 7, 8, 10, 11, 11, 12, 12, 12, 12, 11, 11, 10, 8, 7, 5, 4, 3, 2, 2, 0, 0, 0, 0,
0, 0, 0, 1, 2, 2, 4, 5, 6, 8, 9, 11, 12, 13, 14, 14, 14, 14, 13, 12, 11, 9, 8, 6, 5, 4, 2, 2, 1, 0, 0, 0,
0, 0, 1, 2, 2, 3, 5, 6, 8, 10, 12, 14, 15, 17, 18, 18, 18, 18, 17, 15, 14, 12, 10, 8, 6, 5, 3, 2, 2, 1, 0, 0,

View File

@ -241,7 +241,7 @@ static void compile_program(void)
" void main()\n"
"{\n"
" vec2 pos = position + (offset / 64.0) * scale;\n"
" vec2 pos = position + (offset / 64.0) * scale * colour / 127.0;\n"
" fragColour = colour * brightness / (127.0 * 255.0);\n"
" float tx = floor(packedTexCoords * 0.0625);\n" // RPI gets upset if we divide by 16 so multiply by 1/16 instead.
" float ty = packedTexCoords - tx * 16.0;\n"