mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-20 07:57:55 +08:00
item lights
This commit is contained in:
parent
a1cb96dd03
commit
0c88744e8d
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,52 @@
|
|||||||
item.1000 = glow_berries soul_lantern conduit beacon sea_pickle sea_lantern glowstone redstone_torch jack_o_lantern magma_block lantern shroomlight end_rod lava_bucket conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:conquest:iron_candelabrum_1 conquest:conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
item.1000=soul_lantern conduit beacon sea_pickle sea_lantern glowstone redstone_torch jack_o_lantern magma_block lantern shroomlight end_rod lava_bucket conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:conquest:iron_candelabrum_1 conquest:conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
||||||
|
|
||||||
item.1001 = torch
|
item.1001=large_amethyst_bud
|
||||||
item.1002 = soul_torch
|
|
||||||
|
item.1002=medium_amethyst_bud
|
||||||
|
|
||||||
|
item.1003=amethyst_cluster
|
||||||
|
|
||||||
|
item.1004=beacon
|
||||||
|
|
||||||
|
item.1005=blaze_rod
|
||||||
|
|
||||||
|
item.1006=end_rod
|
||||||
|
|
||||||
|
item.1007=ochre_froglight
|
||||||
|
|
||||||
|
item.1008=pearlescent_froglight
|
||||||
|
|
||||||
|
item.1009=verdant_froglight
|
||||||
|
|
||||||
|
item.1010=glow_berries
|
||||||
|
|
||||||
|
item.1011=glow_lichen
|
||||||
|
|
||||||
|
item.1012=glowstone
|
||||||
|
|
||||||
|
item.1013=glowstone_dust
|
||||||
|
|
||||||
|
item.1014=jack_o_lantern
|
||||||
|
|
||||||
|
item.1015=lantern
|
||||||
|
|
||||||
|
item.1016=lava_bucket
|
||||||
|
|
||||||
|
## ITEM_LIGHT
|
||||||
|
# item.* = light
|
||||||
|
|
||||||
|
item.1017=magma_block
|
||||||
|
|
||||||
|
item.1018=redstone_torch
|
||||||
|
|
||||||
|
item.1019=sculk_catalyst
|
||||||
|
|
||||||
|
item.1020=sea_lantern
|
||||||
|
|
||||||
|
item.1021=shroomlight
|
||||||
|
|
||||||
|
item.1022=soul_lantern
|
||||||
|
|
||||||
|
item.1023=soul_torch
|
||||||
|
|
||||||
|
item.1024=torch
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifdef IS_LPV_ENABLED
|
#ifdef IS_LPV_ENABLED
|
||||||
vec3 GetHandLight(const in int itemId, const in vec3 playerPos) {
|
vec3 GetHandLight(const in int itemId, const in vec3 playerPos, const in vec3 normal) {
|
||||||
vec3 lightFinal = vec3(0.0);
|
vec3 lightFinal = vec3(0.0);
|
||||||
vec3 lightColor = vec3(0.0);
|
vec3 lightColor = vec3(0.0);
|
||||||
float lightRange = 0.0;
|
float lightRange = 0.0;
|
||||||
@ -11,8 +11,10 @@
|
|||||||
|
|
||||||
if (lightRange > 0.0) {
|
if (lightRange > 0.0) {
|
||||||
float lightDist = length(playerPos);
|
float lightDist = length(playerPos);
|
||||||
|
vec3 lightDir = playerPos / lightDist;
|
||||||
|
float NoL = 1.0;//max(dot(normal, lightDir), 0.0);
|
||||||
float falloff = pow(1.0 - lightDist / lightRange, 3.0);
|
float falloff = pow(1.0 - lightDist / lightRange, 3.0);
|
||||||
lightFinal = lightColor * max(falloff, 0.0);
|
lightFinal = lightColor * NoL * max(falloff, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return lightFinal;
|
return lightFinal;
|
||||||
@ -55,11 +57,13 @@ vec3 DoAmbientLightColor(
|
|||||||
|
|
||||||
TorchLight = mix(TorchLight,LpvTorchLight/5.0, LpvFadeF);
|
TorchLight = mix(TorchLight,LpvTorchLight/5.0, LpvFadeF);
|
||||||
|
|
||||||
|
const vec3 normal = vec3(0.0); // TODO
|
||||||
|
|
||||||
if (heldItemId > 0)
|
if (heldItemId > 0)
|
||||||
TorchLight += GetHandLight(heldItemId, playerPos);
|
TorchLight += GetHandLight(heldItemId, playerPos, normal);
|
||||||
|
|
||||||
if (heldItemId2 > 0)
|
if (heldItemId2 > 0)
|
||||||
TorchLight += GetHandLight(heldItemId2, playerPos);
|
TorchLight += GetHandLight(heldItemId2, playerPos, normal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return IndirectLight + TorchLight * TorchBrightness_autoAdjust;
|
return IndirectLight + TorchLight * TorchBrightness_autoAdjust;
|
||||||
|
@ -1 +1,25 @@
|
|||||||
#define ITEM_LIGHT_SOURCES 1000
|
#define ITEM_LIGHT_SOURCES 1000
|
||||||
|
#define ITEM_AMETHYST_BUD_LARGE 1001
|
||||||
|
#define ITEM_AMETHYST_BUD_MEDIUM 1002
|
||||||
|
#define ITEM_AMETHYST_CLUSTER 1003
|
||||||
|
#define ITEM_BEACON 1004
|
||||||
|
#define ITEM_BLAZE_ROD 1005
|
||||||
|
#define ITEM_END_ROD 1006
|
||||||
|
#define ITEM_FROGLIGHT_OCHRE 1007
|
||||||
|
#define ITEM_FROGLIGHT_PEARLESCENT 1008
|
||||||
|
#define ITEM_FROGLIGHT_VERDANT 1009
|
||||||
|
#define ITEM_GLOW_BERRIES 1010
|
||||||
|
#define ITEM_GLOW_LICHEN 1011
|
||||||
|
#define ITEM_GLOWSTONE 1012
|
||||||
|
#define ITEM_GLOWSTONE_DUST 1013
|
||||||
|
#define ITEM_JACK_O_LANTERN 1014
|
||||||
|
#define ITEM_LANTERN 1015
|
||||||
|
#define ITEM_LAVA_BUCKET 1016
|
||||||
|
#define ITEM_MAGMA 1017
|
||||||
|
#define ITEM_REDSTONE_TORCH 1018
|
||||||
|
#define ITEM_SCULK_CATALYST 1019
|
||||||
|
#define ITEM_SEA_LANTERN 1020
|
||||||
|
#define ITEM_SHROOMLIGHT 1021
|
||||||
|
#define ITEM_SOUL_LANTERN 1022
|
||||||
|
#define ITEM_SOUL_TORCH 1023
|
||||||
|
#define ITEM_TORCH 1024
|
||||||
|
77
shaders/template/item.properties
Normal file
77
shaders/template/item.properties
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
#= ITEM_LIGHT_SOURCES
|
||||||
|
item.1000 = soul_lantern conduit beacon sea_pickle sea_lantern glowstone redstone_torch jack_o_lantern magma_block lantern shroomlight end_rod lava_bucket conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:conquest:iron_candelabrum_1 conquest:conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
||||||
|
|
||||||
|
#= ITEM_AMETHYST_BUD_LARGE
|
||||||
|
item.* = large_amethyst_bud
|
||||||
|
|
||||||
|
#= ITEM_AMETHYST_BUD_MEDIUM
|
||||||
|
item.* = medium_amethyst_bud
|
||||||
|
|
||||||
|
#= ITEM_AMETHYST_CLUSTER
|
||||||
|
item.* = amethyst_cluster
|
||||||
|
|
||||||
|
#= ITEM_BEACON
|
||||||
|
item.* = beacon
|
||||||
|
|
||||||
|
#= ITEM_BLAZE_ROD
|
||||||
|
item.* = blaze_rod
|
||||||
|
|
||||||
|
#= ITEM_END_ROD
|
||||||
|
item.* = end_rod
|
||||||
|
|
||||||
|
#= ITEM_FROGLIGHT_OCHRE
|
||||||
|
item.* = ochre_froglight
|
||||||
|
|
||||||
|
#= ITEM_FROGLIGHT_PEARLESCENT
|
||||||
|
item.* = pearlescent_froglight
|
||||||
|
|
||||||
|
#= ITEM_FROGLIGHT_VERDANT
|
||||||
|
item.* = verdant_froglight
|
||||||
|
|
||||||
|
#= ITEM_GLOW_BERRIES
|
||||||
|
item.* = glow_berries
|
||||||
|
|
||||||
|
#= ITEM_GLOW_LICHEN
|
||||||
|
item.* = glow_lichen
|
||||||
|
|
||||||
|
#= ITEM_GLOWSTONE
|
||||||
|
item.* = glowstone
|
||||||
|
|
||||||
|
#= ITEM_GLOWSTONE_DUST
|
||||||
|
item.* = glowstone_dust
|
||||||
|
|
||||||
|
#= ITEM_JACK_O_LANTERN
|
||||||
|
item.* = jack_o_lantern
|
||||||
|
|
||||||
|
#= ITEM_LANTERN
|
||||||
|
item.* = lantern
|
||||||
|
|
||||||
|
#= ITEM_LAVA_BUCKET
|
||||||
|
item.* = lava_bucket
|
||||||
|
|
||||||
|
## ITEM_LIGHT
|
||||||
|
# item.* = light
|
||||||
|
|
||||||
|
#= ITEM_MAGMA
|
||||||
|
item.* = magma_block
|
||||||
|
|
||||||
|
#= ITEM_REDSTONE_TORCH
|
||||||
|
item.* = redstone_torch
|
||||||
|
|
||||||
|
#= ITEM_SCULK_CATALYST
|
||||||
|
item.* = sculk_catalyst
|
||||||
|
|
||||||
|
#= ITEM_SEA_LANTERN
|
||||||
|
item.* = sea_lantern
|
||||||
|
|
||||||
|
#= ITEM_SHROOMLIGHT
|
||||||
|
item.* = shroomlight
|
||||||
|
|
||||||
|
#= ITEM_SOUL_LANTERN
|
||||||
|
item.* = soul_lantern
|
||||||
|
|
||||||
|
#= ITEM_SOUL_TORCH
|
||||||
|
item.* = soul_torch
|
||||||
|
|
||||||
|
#= ITEM_TORCH
|
||||||
|
item.* = torch
|
Loading…
x
Reference in New Issue
Block a user