mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
floodfill voxel mask
This commit is contained in:
11
shaders/lib/lpv_common.glsl
Normal file
11
shaders/lib/lpv_common.glsl
Normal file
@ -0,0 +1,11 @@
|
||||
const uint LpvSize = uint(exp2(LPV_SIZE));
|
||||
|
||||
layout(r16ui) uniform uimage3D imgVoxelMask;
|
||||
|
||||
// #if defined RENDER_SHADOWCOMP || defined RENDER_GBUFFER
|
||||
// layout(r16ui) uniform uimage2D imgVoxelMask;
|
||||
// #elif defined RENDER_BEGIN || defined RENDER_GEOMETRY || defined RENDER_VERTEX
|
||||
// layout(r16ui) uniform writeonly uimage2D imgVoxelMask;
|
||||
// #else
|
||||
// layout(r16ui) uniform readonly uimage2D imgVoxelMask;
|
||||
// #endif
|
5
shaders/lib/lpv_write.glsl
Normal file
5
shaders/lib/lpv_write.glsl
Normal file
@ -0,0 +1,5 @@
|
||||
void SetVoxelBlock(const in vec3 playerPos, const in uint blockId) {
|
||||
vec3 cameraOffset = fract(cameraPosition);
|
||||
ivec3 voxelPos = ivec3(floor(playerPos + cameraOffset + LpvSize/2u));
|
||||
imageStore(imgVoxelMask, voxelPos, uvec4(blockId));
|
||||
}
|
@ -669,6 +669,18 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#define DH_KNOWN_ISSUES 0 // [0 1 2 3 4 5]
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
// ----- DISTANT HORIZONS SETTINGS ----- //
|
||||
///////////////////////////////////////////
|
||||
|
||||
#define LPV_ENABLED
|
||||
#define LPV_SIZE 7 // [6 7 8]
|
||||
|
||||
#if defined LPV_ENABLED && defined IRIS_FEATURE_CUSTOM_IMAGES
|
||||
#define IS_LPV_ENABLED
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
// ----- DEBUG SETTINGS ----- //
|
||||
////////////////////////////////
|
||||
|
Reference in New Issue
Block a user