mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-10 12:34:11 +01:00
3692dbdf3c
- Calculate AO in flw_light - Pack block light, sky light, and valid block count into a single uint when reading the 3x3x3 light volume for a fragment. This saves a significant amount of memory and integer additions in the shader, but does require slightly more alu ops overall for the packing/unpacking - Add pragma optionNV (unroll all) for significant perf boost, may want to manually unroll to be cross-platform - Remove redundant flw_light
8 lines
337 B
GLSL
8 lines
337 B
GLSL
/// Get the light at the given world position.
|
|
/// This may be interpolated for smooth lighting.
|
|
bool flw_light(vec3 worldPos, vec3 normal, out vec3 light);
|
|
|
|
/// Fetches the light value at the given block position.
|
|
/// Returns false if the light for the given block is not available.
|
|
bool flw_lightFetch(ivec3 blockPos, out vec2 light);
|