Skip to content

Commit

Permalink
Name tag shadow option, fix translucent overlay, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralhalo committed May 5, 2021
1 parent 504077b commit 1f02ac9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions assets/lumi/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"config.lumi_lights.help.glint_blue": "Enchantment glint color (blue value)",
"config.lumi_lights.value.toon_outline": "Toon outline",
"config.lumi_lights.help.toon_outline": "Render \"toon\" style object outline",
"config.lumi_lights.value.name_tag_shadow": "Name tag shadow",
"config.lumi_lights.help.name_tag_shadow": "Render name tag shadow",

"config.lumi_lights.category.performance": "Performance",
"config.lumi_lights.value.antialiasing": "Anti-aliasing",
Expand Down
5 changes: 5 additions & 0 deletions assets/lumi/pipeline/config/aesthetics_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
nameKey: "config.lumi_lights.value.toon_outline",
descriptionKey: "config.lumi_lights.help.toon_outline"
},
name_tag_shadow: {
default: false,
nameKey: "config.lumi_lights.value.name_tag_shadow",
descriptionKey: "config.lumi_lights.help.name_tag_shadow"
},
// bloom_upsample_dist: {
// default: 5,
// min: 1,
Expand Down
11 changes: 7 additions & 4 deletions assets/lumi/shaders/forward/shadow.frag
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include frex:shaders/lib/math.glsl
#include frex:shaders/lib/color.glsl
#include frex:shaders/api/world.glsl
#include frex:shaders/api/player.glsl
#include frex:shaders/api/material.glsl
#include frex:shaders/api/player.glsl
#include frex:shaders/api/world.glsl
#include frex:shaders/lib/color.glsl
#include frex:shaders/lib/math.glsl
#include lumi:shaders/common/userconfig.glsl

/******************************************************
lumi:shaders/forward/shadow.frag
Expand All @@ -18,9 +19,11 @@ frx_FragmentData frx_createPipelineFragment() {
}

void frx_writePipelineFragment(in frx_FragmentData fragData) {
#ifndef NAME_TAG_SHADOW
if (v_managed == 0.) {
discard;
}
#endif

gl_FragDepth = gl_FragCoord.z;
}
2 changes: 1 addition & 1 deletion assets/lumi/shaders/forward/shadow.vert
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include frex:shaders/api/material.glsl
#include frex:shaders/api/view.glsl
#include lumi:shaders/lib/util.glsl
#include frex:shaders/api/material.glsl

/******************************************************
lumi:shaders/forward/shadow.vert
Expand Down
2 changes: 1 addition & 1 deletion assets/lumi/shaders/post/common/shading.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ vec4 hdr_shaded_color(
a.rgb *= 0.25 + 0.75 * fract(frx_renderSeconds()*2.0);
#endif
// marker for unmanaged draw
a.a = 0.0;
a.a = translucent ? a.a : 0.0;
return a;
}
vec3 normal = texture(snormal, uv).xyz * 2.0 - 1.0;
Expand Down

0 comments on commit 1f02ac9

Please sign in to comment.