Skip to content

Instantly share code, notes, and snippets.

View devshgraphicsprogramming's full-sized avatar

Mateusz Kielan devshgraphicsprogramming

View GitHub Profile
@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
@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;
@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