mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 08:42:50 +08:00
more lpv block mappings; add entity lights
This commit is contained in:
@ -52,6 +52,7 @@ uniform int entityId;
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
attribute vec3 at_midBlock;
|
||||
uniform int currentRenderedItemId;
|
||||
uniform int renderStage;
|
||||
|
||||
#include "/lib/voxel_common.glsl"
|
||||
@ -190,10 +191,8 @@ void main() {
|
||||
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_EXT_shader_image_load_store
|
||||
if (
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_SOLID ||
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_CUTOUT ||
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_CUTOUT_MIPPED ||
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_SOLID || renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT ||
|
||||
renderStage == MC_RENDER_STAGE_TERRAIN_CUTOUT || renderStage == MC_RENDER_STAGE_TERRAIN_CUTOUT_MIPPED
|
||||
) {
|
||||
uint voxelId = uint(blockId);
|
||||
if (voxelId == 0u) voxelId = 1u;
|
||||
@ -202,6 +201,23 @@ void main() {
|
||||
|
||||
SetVoxelBlock(originPos, voxelId);
|
||||
}
|
||||
|
||||
#ifdef LPV_ENTITY_LIGHTS
|
||||
if (
|
||||
(currentRenderedItemId > 0 || entityId > 0) &&
|
||||
(renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES || renderStage == MC_RENDER_STAGE_ENTITIES)
|
||||
) {
|
||||
uint voxelId = uint(BLOCK_EMPTY);
|
||||
|
||||
if (currentRenderedItemId > 0) voxelId = uint(currentRenderedItemId);
|
||||
else {
|
||||
// TODO: set from entityId
|
||||
}
|
||||
|
||||
if (voxelId > 0u)
|
||||
SetVoxelBlock(playerpos, voxelId);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WAVY_PLANTS
|
||||
|
Reference in New Issue
Block a user