Bliss-Shader/shaders/lib/lpv_common.glsl

21 lines
670 B
Plaintext
Raw Normal View History

2024-05-01 16:32:25 -04:00
layout(rgba8) uniform image3D imgLpv1;
layout(rgba8) uniform image3D imgLpv2;
2024-05-01 13:40:52 -04:00
2024-05-01 16:32:25 -04:00
const uint LpvSize = uint(exp2(LPV_SIZE));
const uvec3 LpvSize3 = uvec3(LpvSize);
2024-05-01 13:40:52 -04:00
// #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
2024-05-01 16:32:25 -04:00
2024-05-02 12:43:30 -04:00
// #define LIGHT_NONE 0
vec3 GetLpvPosition(const in vec3 playerPos) {
vec3 cameraOffset = fract(cameraPosition);
return playerPos + cameraOffset + LpvSize3/2u + 0.5;
}