2
0
Fork
You've already forked cld
0
No description
  • C 78.7%
  • Hare 16%
  • GLSL 4.6%
  • Makefile 0.7%
Find a file
2025年08月22日 17:04:54 +02:00
cld parser ~ 2025年07月15日 15:49:54 +02:00
cmd parser ~ 2025年07月15日 15:49:54 +02:00
.gitignore gitignore: tags file 2025年07月11日 18:24:39 +02:00
example.cld parser ~ 2025年07月15日 15:49:54 +02:00
Makefile parser ~ 2025年07月15日 15:49:54 +02:00
monospace.ttf font: monospace 2025年07月10日 23:14:51 +02:00
readme.md renamed readme 2025年07月10日 23:25:43 +02:00
shader.glsl fix: mix() does not work on all platforms, implemented lerp() by hand 2025年08月22日 17:04:54 +02:00
shader3d.glsl working ray in 3d 2025年07月10日 23:46:12 +02:00
spec.md cmd/ dir for executables + cld module 2025年07月11日 17:10:55 +02:00

CLD

Compile signed distance functions to GLSL

Dont use this. Use Bauble instead.

Compiling

Dependencies

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.