Fixing the asterisk glyph in the font and glyph sets.

Adding the megacity glyph to the font and added a megacity glyph set.
Fixed a bug in the rain pass's fragment shader that caused glyphs in the last column to go missing
This commit is contained in:
Rezmason
2022-04-28 18:18:15 -07:00
parent d3905387fb
commit b56f63b74b
8 changed files with 19 additions and 7 deletions

View File

@@ -25,8 +25,9 @@ float median3(vec3 i) {
vec2 getSymbolUV(float glyphCycle) {
float symbol = floor((glyphSequenceLength) * glyphCycle) + 1.0;
float symbolX = mod(symbol, glyphTextureGridSize.x) - 1.0;
float symbolY = glyphTextureGridSize.y - 1.0 - (mod(floor(symbol / glyphTextureGridSize.x), glyphTextureGridSize.y));
float symbolX = mod(symbol, glyphTextureGridSize.x);
float symbolY = mod(floor(symbol / glyphTextureGridSize.x), glyphTextureGridSize.y);
symbolY = glyphTextureGridSize.y - symbolY - 1.0;
return vec2(symbolX, symbolY);
}

View File

@@ -377,6 +377,7 @@ fn getSymbolUV(glyphCycle : f32) -> vec2<f32> {
var symbol = i32(f32(config.glyphSequenceLength) * glyphCycle);
var symbolX = symbol % config.glyphTextureGridSize.x;
var symbolY = symbol / config.glyphTextureGridSize.x;
// TODO: make sure this is working properly, it had a bug in the GLSL for a while.
return vec2<f32>(f32(symbolX), f32(symbolY));
}