Skip to content

πŸ‘ƒ NASL is not a shading language πŸ‘ƒ

Notifications You must be signed in to change notification settings

shady-gang/nasl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NASL πŸ‘ƒ Not A Shading Language

NASL is not a shading language. It is a simple, C/C++, vector math library for writing shader-like code, in a conventional language. It supports automatic conversions to and from Clang/GCC's native vector types, swizzling (C++20 only) and can be used together with Vcc to make real shaders.

Taster

#include <nasl.h>

using namespace nasl;

vec3 blue() { return vec3(0.0f, 0.0, 1.0); }
vec3 yellow() { return blue().zzx; }

vec4 shader(vec2 pos) {
    vec3 color;
    if (pos.y > 0.5)
      color = blue();
    else
      color = yellow();
    return vec4(color, pos);
}

About

πŸ‘ƒ NASL is not a shading language πŸ‘ƒ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published