Skip to content

Instantly share code, notes, and snippets.

@Chlumsky
Chlumsky / msdf-preview.shadron
Last active August 27, 2021 07:41
MSDF Preview
#include <math_constants>
#include <median>
#include <billboard>
#include <affine_transform>
glsl float linearStep(float a, float b, float x) {
return clamp((x-a)/(b-a), 0.0, 1.0);
}
@Chlumsky
Chlumsky / cogwheels.shadron
Created October 30, 2016 21:44
Shadron Cogwheels Tutorial
#include <math_constants>
#include <multisample>
glsl struct Cogwheel {
vec2 center;
float r;
int teeth;
float toothSize;
float toothShape;