more fixed block entity mappings

This commit is contained in:
NULL511 2024-06-17 16:10:33 -04:00
parent d9e82f688a
commit a05ca58044
2 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,6 @@ void SetVoxelBlock(const in vec3 playerPos, const in uint blockId) {
} }
void PopulateShadowVoxel(const in vec3 playerPos) { void PopulateShadowVoxel(const in vec3 playerPos) {
//int blockId = int(mc_Entity.x + 0.5);
uint voxelId = uint(mc_Entity.x + 0.5); uint voxelId = uint(mc_Entity.x + 0.5);
vec3 originPos = playerPos; vec3 originPos = playerPos;
@ -22,6 +21,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) {
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE #ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1); if (voxelId == 0u && at_midBlock.w > 0) voxelId = uint(BLOCK_LIGHT_1 + at_midBlock.w - 1);
#endif #endif
if (voxelId == 0u) voxelId = 1u; if (voxelId == 0u) voxelId = 1u;
originPos += at_midBlock.xyz/64.0; originPos += at_midBlock.xyz/64.0;
@ -32,7 +32,7 @@ void PopulateShadowVoxel(const in vec3 playerPos) {
((renderStage == MC_RENDER_STAGE_ENTITIES && (currentRenderedItemId > 0 || entityId > 0)) || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) ((renderStage == MC_RENDER_STAGE_ENTITIES && (currentRenderedItemId > 0 || entityId > 0)) || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)
) { ) {
if (renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) { if (renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES) {
if (blockEntityId > 0 && blockEntityId < 1000) if (blockEntityId > 0 && blockEntityId < 500)
voxelId = uint(blockEntityId); voxelId = uint(blockEntityId);
} }
else if (currentRenderedItemId > 0 && currentRenderedItemId < 1000) { else if (currentRenderedItemId > 0 && currentRenderedItemId < 1000) {

View File

@ -235,7 +235,7 @@ void main() {
(InterpolateFromBase && (blockId == BLOCK_GRASS_TALL_LOWER || blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GRASS_SHORT || blockId == BLOCK_SAPLING || blockId == BLOCK_GROUND_WAVING_VERTICAL)) (InterpolateFromBase && (blockId == BLOCK_GRASS_TALL_LOWER || blockId == BLOCK_GROUND_WAVING || blockId == BLOCK_GRASS_SHORT || blockId == BLOCK_SAPLING || blockId == BLOCK_GROUND_WAVING_VERTICAL))
// these wave off of the ceiling. the area connected to the ceiling does not wave. // these wave off of the ceiling. the area connected to the ceiling does not wave.
|| (!InterpolateFromBase && (blockId == 17)) || (!InterpolateFromBase && (blockId == BLOCK_VINE_OTHER))
// these wave off of the air. they wave uniformly // these wave off of the air. they wave uniformly
|| (blockId == BLOCK_GRASS_TALL_UPPER || blockId == BLOCK_AIR_WAVING) || (blockId == BLOCK_GRASS_TALL_UPPER || blockId == BLOCK_AIR_WAVING)
@ -256,7 +256,8 @@ void main() {
#ifdef DISTORT_SHADOWMAP #ifdef DISTORT_SHADOWMAP
if(entityId == 1100) position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25; if (entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SLIME)
position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
gl_Position = BiasShadowProjection(toClipSpace3(position)); gl_Position = BiasShadowProjection(toClipSpace3(position));
#else #else