Skip to content

BLEU-IO/midad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Midad

Midad is a high-performance text rasterization application that utilizes Vulkan compute shaders to shape and render text. It processes strings and curves from font files, producing both standard high-quality textures and quantized ASCII block-based representations directly on the GPU.

Prerequisites

To build and run this project, you will need the following dependencies on your system:

  • *Odin: Required to compile the main application.
  • Slang Compiler: Required to compile the compute shaders into SPIR-V format.

Building and Running

Midad uses a simple bash script to compile the shaders and build the application. You can build it by simply running:

./build.sh

Important Note on Slang: The build.sh script currently assumes you have installed the Slang compiler from the Arch User Repository (AUR) via the slang-shader-bin package. If you installed Slang differently or are on another distribution, you will likely need to edit build.sh and modify the PATH variable export to point to where your slangc binary is located.

After building, run the application by providing a text file as an argument:

./build/midad path/to/text_file.txt

Changing the Font

Currently, the primary and monospaced fonts are hardcoded into the setup phase of the program. If you want to change the font being rasterized, you will need to open src/main.odin and modify the file paths passed directly to the load_font_embedded function calls.

Output Files

When you run the program, it will generate 4 primary output files inside the build/ directory demonstrating the pipeline results:

  1. out.png: The standard, high-quality rasterized text output.
  2. ascii_out.png: An image demonstrating the block-based quantized text representation based on an ASCII shading palette.
  3. ascii_output.txt: The raw text file containing the actual structural ASCII characters derived from the text rendering space grid.
  4. palette_out.png: The sequence of rendered ASCII characters serving as the quantization color palette for the secondary pass.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors