No description
- C 78.7%
- Hare 16%
- GLSL 4.6%
- Makefile 0.7%
| cld | parser ~ | |
| cmd | parser ~ | |
| .gitignore | gitignore: tags file | |
| example.cld | parser ~ | |
| Makefile | parser ~ | |
| monospace.ttf | font: monospace | |
| readme.md | renamed readme | |
| shader.glsl | fix: mix() does not work on all platforms, implemented lerp() by hand | |
| shader3d.glsl | working ray in 3d | |
| spec.md | cmd/ dir for executables + cld module | |
CLD
Compile signed distance functions to GLSL
Dont use this. Use Bauble instead.
Compiling
Dependencies
- hare 0.25.2
- raylib 5
- this version of hare-raylib.
- hare-microui
Then just run make
CLD language
In the language, putting float alone in fields that expect an angle will see them a being in radiant however, one could put a ° at the end of the number to specify that it is in degrees.
On the coordinate system
When reading and writing some shader code, one should always use w as the pixel of interest rather than fragTexCoord, indeed, w is shifted by 1.0 in the y direction:
vec2 w = vec2(fragTexCoord.x, 1.0 - fragTexCoord.y);
This ensures that the top right corner is at coordinate (1.0, 1.0) and that the origin is at the bottom left.