Skip to content

Instantly share code, notes, and snippets.

View aras-p's full-sized avatar

Aras Pranckevičius aras-p

View GitHub Profile
davidgyu / displayOsdFVarCoord.cpp
Created February 5, 2013 20:48
OpenSubdiv Example: Uniform Subdivision with Face-varying Data
View displayOsdFVarCoord.cpp
// This is a simple example that uses face-varying u,v data
// with uniform catmull-clark subdivision using OpenSubdiv
// c++ -o displayOsdFVarCoord displayOsdFVarCoord.cpp -I$OPENSUBDIV/include -L$OPENSUBDIV/lib -losdCPU -lglut -lGL
#if defined(__APPLE__)
#include <GLUT/glut.h>

State of Roblox graphics API across all platforms, with percentage deltas since EOY 2018. Updated December 29 2019.


API Share
Direct3D 11+ 85% (+5%)
Direct3D 10.1 8.5% (-1.5%)
Direct3D 10.0 5.5% (-2.5%)
Direct3D 9 1% (-1%)
rygorous / gist:2144712
Created March 21, 2012 05:20
half->float variants
View gist:2144712
// half->float variants.
// by Fabian "ryg" Giesen.
// I hereby place this code in the public domain.
// half_to_float_fast: table based
// tables could be done in a more compact fashion (in particular, can store tab2 in low word of tab1!)
// but something of a dead end since not very SIMD-friendly. pretty much abandoned at this point.
// half_to_float_fast2: use FP adder hardware to deal with denormals.
Reedbeta / interesting-libs.txt
Last active July 4, 2023 02:38
Interesting libraries I might like to use in a project
View interesting-libs.txt
Interesting libraries I might like to use in a project...
Asset loading:
assetsys.h - virtual filesystem with ZIP backing, overlaying, etc
cute_filewatch.h - file modification watching, for runtime reloading etc
flatbuffers - data serialization, zero-copy deserialization, extensible schemas
stb_image -
tinyexr -
tinygltf -
tinyobjloader -
rygorous / Stats.js
Created April 25, 2012 03:48
Half-space tri rasterizers in JS
View Stats.js
// stats.js r9 -
var Stats=function(){var h,a,r=0,s=0,,u=i,t=i,l=0,n=1E3,o=0,e,j,f,b=[[16,16,48],[0,255,255]],m=0,p=1E3,q=0,d,k,g,c=[[16,48,16],[0,255,0]];h=document.createElement("div");"pointer";"80px";"0.9";"10001";h.addEventListener("mousedown",function(a){a.preventDefault();r=(r+1)%2;0==r?("block","none"):("none","block")},!1);e=document.createElement("div");
"left";"1.2em";"rgb("+Math.floor(b[0][0]/2)+","+Math.floor(b[0][1]/2)+","+Math.floor(b[0][2]/2)+")";"0 0 3px 3px";h.appendChild(e);j=document.createElement("div");"Helvetica, Arial, sans-serif";"9px";"rgb("+b[1][0]+","+b[1][1]+","+b[1][2]+")";"bold";j.innerHTML="FPS";e.appendChild(j);f=document.createElement("div");"relati
rygorous / gist:2156668
Last active September 20, 2023 09:39
float->half variants
View gist:2156668
// float->half variants.
// by Fabian "ryg" Giesen.
// I hereby place this code in the public domain, as per the terms of the
// CC0 license:
// float_to_half_full: This is basically the ISPC stdlib code, except
// I preserve the sign of NaNs (any good reason not to?)