Skip to content

Commit

Permalink
Held light for stone torch, lamp only glow when placed, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralhalo committed Jan 12, 2021
1 parent ad0ba28 commit 45c152c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 8 additions & 0 deletions assets/adorn/lights/item/stone_torch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"intensity": 1.0,
"red": 1.0,
"green": 0.875,
"blue": 0.75,
"worksInFluid": false
}

12 changes: 7 additions & 5 deletions assets/lumicompat/shaders/material/adorn/lamp.frag
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
******************************************************/

void frx_startFragment(inout frx_FragmentData data)
{
vec3 pos = frx_var2.xyz;
float mag = 2.0*abs(0.6-fract(pos.y));
data.emissivity = smoothstep(0.3, 1.0, 1.0-mag*mag);

{
if (frx_modelOriginType() == MODEL_ORIGIN_REGION) {
vec3 pos = frx_var2.xyz;
float mag = 2.0*abs(0.6-fract(pos.y));
data.emissivity = smoothstep(0.3, 1.0, 1.0-mag*mag);
}

vec4 c = data.spriteColor;
float min_ = min( min(c.r, c.g), c.b );
float max_ = max( max(c.r, c.g), c.b );
Expand Down
2 changes: 1 addition & 1 deletion pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 6,
"description": "Lumi PBR support for mods \n§8by spiralhalo [v0.5]"
"description": "Lumi PBR support for mods \n§8by spiralhalo [v0.6]"
}
}

0 comments on commit 45c152c

Please sign in to comment.