Skip to content

Instantly share code, notes, and snippets.

View ChemistAion's full-sized avatar
🙃

rtj ChemistAion

🙃
View GitHub Profile
@markknol
markknol / shadertoy.md
Last active July 10, 2024 19:42
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@tgjones
tgjones / HlslAntlrLexer.g4
Created May 25, 2015 10:17
ANTLR4 grammar for HLSL
lexer grammar HlslAntlrLexer;
@lexer::header {#pragma warning disable 3021}
AppendStructuredBuffer : 'AppendStructuredBuffer';
Bool : 'bool';
Bool1 : 'bool1';
Bool2 : 'bool2';
Bool3 : 'bool3';
Bool4 : 'bool4';