Skip to content

Instantly share code, notes, and snippets.

View devshgraphicsprogramming's full-sized avatar

Mateusz Kielan devshgraphicsprogramming

View GitHub Profile
@Reedbeta
Reedbeta / interesting-libs.txt
Last active July 4, 2023 02:38
Interesting libraries I might like to use in a project
Interesting libraries I might like to use in a project...
Asset loading:
assetsys.h - virtual filesystem with ZIP backing, overlaying, etc https://github.com/mattiasgustavsson/libs/blob/master/docs/assetsys.md
cute_filewatch.h - file modification watching, for runtime reloading etc https://github.com/RandyGaul/cute_headers/blob/master/cute_filewatch.h
flatbuffers - data serialization, zero-copy deserialization, extensible schemas https://github.com/google/flatbuffers
stb_image - https://github.com/nothings/stb/blob/master/stb_image.h
tinyexr - https://github.com/syoyo/tinyexr
tinygltf - https://github.com/syoyo/tinygltf
tinyobjloader - https://github.com/syoyo/tinyobjloader
@devshgraphicsprogramming
devshgraphicsprogramming / raycastPlanetAtmosphere.glsl
Created February 15, 2018 16:01
Planet Atmosphere Intersection Shader Function
//!Warning does not model intersection with the Planet itself in the middle of the atmosphere
float calculateHazeFactor(in float fragDepth, in vec3 viewDir)
{
//hazeHeight and camPos are heights above sea level
bool aboveHaze = camPos>hazeHeight;
if (aboveHaze&&viewDir.y>=0.0)
return 1.0;
float planetRadius = 6357.0;
float hazeRadius = planetRadius+hazeHeight;
@mebiusbox
mebiusbox / GGXApproxDiffuse.brdf
Created September 8, 2017 14:25
GGX Approximation Diffuse for BRDF Explorer
analytic
# variables go here...
# only floats supported right now.
# [type] [name] [min val] [max val] [default val]
::begin parameters
float albedo 0 1 1
float roughness 0 1 1
::end parameters