mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
entity.properties template; lpv hand-light prep
This commit is contained in:
@ -1,3 +1,14 @@
|
||||
#ifdef IS_LPV_ENABLED
|
||||
vec3 GetHandLight(const in int itemId) {
|
||||
if (itemId < 1000) {
|
||||
// TODO: block lights
|
||||
}
|
||||
else {
|
||||
// TODO: item lights
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
vec3 DoAmbientLightColor(
|
||||
vec3 lpvPos,
|
||||
vec3 SkyColor,
|
||||
@ -24,9 +35,6 @@ vec3 DoAmbientLightColor(
|
||||
vec4 lpvSample = SampleLpvLinear(lpvPos);
|
||||
vec3 LpvTorchLight = GetLpvBlockLight(lpvSample);
|
||||
|
||||
// TODO: needs work, just binary transition for now
|
||||
// float LpvFadeF = clamp(lpvPos, vec3(0.0), LpvSize3 - 1.0) == lpvPos ? 1.0 : 0.0;
|
||||
|
||||
// i gotchu
|
||||
float fadeLength = 10.0; // in blocks
|
||||
vec3 cubicRadius = clamp( min(((LpvSize3-1.0) - lpvPos)/fadeLength, lpvPos/fadeLength) ,0.0,1.0);
|
||||
@ -34,7 +42,13 @@ vec3 DoAmbientLightColor(
|
||||
|
||||
LpvFadeF = 1.0 - pow(1.0-pow(LpvFadeF,1.5),3.0); // make it nice and soft :)
|
||||
|
||||
TorchLight = mix(TorchLight,LpvTorchLight/5.0, LpvFadeF) ;
|
||||
TorchLight = mix(TorchLight,LpvTorchLight/5.0, LpvFadeF);
|
||||
|
||||
if (heldItemId > 0)
|
||||
TorchLight += GetHandLight(heldItemId);
|
||||
|
||||
if (heldItemId2 > 0)
|
||||
TorchLight += GetHandLight(heldItemId2);
|
||||
#endif
|
||||
|
||||
return IndirectLight + TorchLight * TorchBrightness_autoAdjust;
|
||||
|
@ -1,10 +1,11 @@
|
||||
#define ENTITY_PLAYER 1201
|
||||
#define ENTITY_LIGHTNING 1202
|
||||
//#define ENTITY_DRAGON_WITHER 1203
|
||||
|
||||
#define ENTITY_ITEM_FRAME 1301
|
||||
#define ENTITY_SPECTRAL_ARROW 1302
|
||||
#define ENTITY_TNT 1303
|
||||
|
||||
#define ENTITY_BLAZE 1203
|
||||
#define ENTITY_DRAGON_WITHER 1204
|
||||
#define ENTITY_ITEM_FRAME 1205
|
||||
#define ENTITY_MAGMA_CUBE 1206
|
||||
#define ENTITY_TNT 1207
|
||||
#define ENTITY_SPECTRAL_ARROW 1208
|
||||
#define ENTITY_SSS_MEDIUM 1401
|
||||
#define ENTITY_SSS_WEAK 1402
|
||||
#define ENTITY_SLIME 1403
|
||||
|
@ -687,6 +687,8 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
#define LPV_REDSTONE_LIGHTS
|
||||
//#define LPV_COLORED_CANDLES
|
||||
|
||||
#define LPV_NOSHADOW_HACK
|
||||
|
||||
#ifdef LPV_ENABLED
|
||||
#ifdef IRIS_FEATURE_CUSTOM_IMAGES
|
||||
#define IS_LPV_ENABLED
|
||||
|
Reference in New Issue
Block a user