entity.properties template; lpv hand-light prep

This commit is contained in:
NULL511
2024-05-06 11:54:30 -04:00
parent 81fb07c371
commit bfcf3e1805
12 changed files with 120 additions and 49 deletions

View File

@ -67,6 +67,8 @@ flat varying float HELD_ITEM_BRIGHTNESS;
#endif
#ifdef IS_LPV_ENABLED
uniform int heldItemId;
uniform int heldItemId2;
uniform int frameCounter;
#include "/lib/hsv.glsl"

View File

@ -107,6 +107,9 @@ uniform vec3 nsunColor;
#endif
#ifdef IS_LPV_ENABLED
uniform int heldItemId;
uniform int heldItemId2;
#include "/lib/hsv.glsl"
#include "/lib/lpv_common.glsl"
#include "/lib/lpv_render.glsl"

View File

@ -123,6 +123,11 @@ flat varying vec3 WsunVec;
flat varying vec3 unsigned_WsunVec;
flat varying float exposure;
#ifdef IS_LPV_ENABLED
uniform int heldItemId;
uniform int heldItemId2;
#endif
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)

View File

@ -131,9 +131,6 @@ void main() {
uint tintData = LpvBlockMap[blockId].Tint;
tintColor = unpackUnorm4x8(tintData).rgb;
}
if (blockId > 0u) {
vec4 lightColorRange = unpackUnorm4x8(LpvBlockMap[blockId].ColorRange);
float lightRange = lightColorRange.a * 255.0;