This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//!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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |