Skip to content

Commit

Permalink
Refraction toggle, rearrange config, improve tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralhalo committed Sep 12, 2021
1 parent 8586ce8 commit 6598d11
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 33 deletions.
18 changes: 10 additions & 8 deletions assets/lumi/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
"config.lumi_lights.value.antialiasing": "Anti-alias and denoising",
"config.lumi_lights.help.antialiasing": "Filtering technique to remove noise and jagged edges",
"config.lumi_lights.value.ambient_occlusion": "Ambient occlusion",
"config.lumi_lights.help.ambient_occlusion": "Ambient occlusion profile;SSAO affects performance.",
"config.lumi_lights.help.ambient_occlusion": "Ambient occlusion profile. SSAO affects performance.",
"config.lumi_lights.value.blocklight_specular_mode": "Block light specular mode",
"config.lumi_lights.help.blocklight_specular_mode": "Method to simulate reflected light;coming from block light.",
"config.lumi_lights.help.blocklight_specular_mode": "Method to simulate reflected light coming from block light.",
"config.lumi_lights.value.reflection_profile": "Screen-space reflection profile",
"config.lumi_lights.help.reflection_profile": "Quality of screen-space reflection;Doesn't affect sky reflection",
"config.lumi_lights.help.reflection_profile": "Quality of screen-space reflection ;Doesn't affect sky reflection",
"config.lumi_lights.value.sky_reflection_profile": "Sky reflection profile",
"config.lumi_lights.help.sky_reflection_profile": "Amount of defail of the sky being reflected",
"config.lumi_lights.value.reflection_maximum_roughness_relative": "Reflection roughness threshold",
"config.lumi_lights.help.reflection_maximum_roughness_relative": "Limits amount of reflective surface based on roughness;(water=1, dirt=10) Lower to improve performance.",
"config.lumi_lights.value.cloud_rendering": "Cloud rendering mode",
"config.lumi_lights.help.cloud_rendering": "Cloud rendering mode;Volumetric cloud impacts performance.",
"config.lumi_lights.help.cloud_rendering": "Cloud rendering mode. Performance varies.",
"config.lumi_lights.value.lightrays_mode": "Light rays mode",
"config.lumi_lights.help.lightrays_mode": "Light rays mode;Volumetric impacts performance and ;requires shadows to be enabled.",
"config.lumi_lights.help.lightrays_mode": "Light rays mode ;Volumetric impacts performance and ;requires shadows to be enabled.",
"config.lumi_lights.value.lightrays_intensity": "Light rays intensity",
"config.lumi_lights.help.lightrays_intensity": "Intensity of light rays effect from the sun",
"config.lumi_lights.value.compute_exposure": "Auto-exposure",
Expand All @@ -68,6 +68,8 @@
"config.lumi_lights.help.manual_exposure_relative": "Manual exposure to use when auto-exposure is OFF",
"config.lumi_lights.value.water_caustics": "Water caustics effect",
"config.lumi_lights.help.water_caustics": "Emulate water caustics",
"config.lumi_lights.value.refraction_effect": "Refraction effect",
"config.lumi_lights.help.refraction_effect": "Distort objects behind water and glass",

"config.lumi_lights.category.ssao": "SSAO",
"config.lumi_lights.value.ssao_num_steps": "Precision",
Expand Down Expand Up @@ -121,7 +123,7 @@

"config.lumi_lights.category.experimental": "Experiments",
"config.lumi_lights.value.translucent_layering": "Advanced translucency",
"config.lumi_lights.help.translucent_layering": "Translucency algorithm;See if `fast` is actually faster.",
"config.lumi_lights.help.translucent_layering": "Translucency algorithm. See if `fast` is actually faster.",
"config.lumi_lights.value.shadow_workaround": "Shadow workaround",
"config.lumi_lights.help.shadow_workaround": "Workaround to fix patches in shadow map",
"config.lumi_lights.value.half_reflection_resolution": "Half reflection resolution",
Expand All @@ -135,13 +137,13 @@
"config.lumi_lights.value.rain_puddles": "Rain puddles effect",
"config.lumi_lights.help.rain_puddles": "Wet ground during rain",
"config.lumi_lights.value.exposure_func": "Exposure function",
"config.lumi_lights.help.exposure_func": "Exposure compute function;Default is median.",
"config.lumi_lights.help.exposure_func": "Exposure compute function. Default is median.",

"config.lumi_lights.category.debug": "Debug",
"config.lumi_lights.value.dithering_mode": "Dithering mode",
"config.lumi_lights.help.dithering_mode": "Noise technique used for dithering AO, reflection, and volumetrics.;Blue noise requires texture loading support.",
"config.lumi_lights.value.parallax_cloud_density": "Parallax clouds density",
"config.lumi_lights.help.parallax_cloud_density": "Density of parallax clouds;Don't use for normal gameplay.",
"config.lumi_lights.help.parallax_cloud_density": "Density of parallax clouds. Don't use for normal gameplay.",
"config.lumi_lights.value.taa_debug_render": "TAA buffer debug",
"config.lumi_lights.help.taa_debug_render": "Render TAA debug buffers instead of the game",
"config.lumi_lights.value.exposure_debug": "Exposure indicator",
Expand Down
54 changes: 29 additions & 25 deletions assets/lumi/pipeline/config/performance_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,6 @@
includeToken: "lumi:performance_config",
categoryKey: "config.lumi_lights.category.performance",
options: {
antialiasing: {
default: "taa",
choices: ["none", "taa", "taa_blurry"],
enum: true,
prefix: "antialiasing_",
nameKey: "config.lumi_lights.value.antialiasing",
descriptionKey: "config.lumi_lights.help.antialiasing"
},
ambient_occlusion: {
default: "ssao",
choices: ["no_ao", "vanilla", "vanilla_and_ssao", "pure_ssao"],
enum: true,
prefix: "ambient_occlusion_",
nameKey: "config.lumi_lights.value.ambient_occlusion",
descriptionKey: "config.lumi_lights.help.ambient_occlusion"
},
blocklight_specular_mode: {
default: "fancy",
choices: ["fast", "fancy"],
enum: true,
prefix: "blocklight_specular_mode_",
nameKey: "config.lumi_lights.value.blocklight_specular_mode",
descriptionKey: "config.lumi_lights.help.blocklight_specular_mode"
},
reflection_profile: {
default: "low",
choices: ["none", "low", "medium", "high", "extreme"],
Expand Down Expand Up @@ -59,6 +35,14 @@
nameKey: "config.lumi_lights.value.cloud_rendering",
descriptionKey: "config.lumi_lights.help.cloud_rendering"
},
ambient_occlusion: {
default: "ssao",
choices: ["no_ao", "vanilla", "vanilla_and_ssao", "pure_ssao"],
enum: true,
prefix: "ambient_occlusion_",
nameKey: "config.lumi_lights.value.ambient_occlusion",
descriptionKey: "config.lumi_lights.help.ambient_occlusion"
},
lightrays_mode: {
default: "volumetric",
choices: ["screenspace", "volumetric"],
Expand Down Expand Up @@ -88,10 +72,30 @@
},
water_caustics: {
default: true,
prefix: "water_caustics_",
nameKey: "config.lumi_lights.value.water_caustics",
descriptionKey: "config.lumi_lights.help.water_caustics"
},
refraction_effect: {
default: true,
nameKey: "config.lumi_lights.value.refraction_effect",
descriptionKey: "config.lumi_lights.help.refraction_effect"
},
blocklight_specular_mode: {
default: "fancy",
choices: ["fast", "fancy"],
enum: true,
prefix: "blocklight_specular_mode_",
nameKey: "config.lumi_lights.value.blocklight_specular_mode",
descriptionKey: "config.lumi_lights.help.blocklight_specular_mode"
},
antialiasing: {
default: "taa",
choices: ["none", "taa", "taa_blurry"],
enum: true,
prefix: "antialiasing_",
nameKey: "config.lumi_lights.value.antialiasing",
descriptionKey: "config.lumi_lights.help.antialiasing"
},
}
},
{
Expand Down
2 changes: 2 additions & 0 deletions assets/lumi/shaders/post/composite.frag
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ void computeDistorted(in sampler2D sdepth, in sampler2D scolor, in vec2 origUV,
depth = texture(sdepth, origUV).r;
vec2 trueUV = origUV;

#ifdef REFRACTION_EFFECT
if (translucentDepth <= depth) {
trueUV = origUV + (texture(u_refraction_uv, origUV).rg * 2.0 - 1.0);
depth = texture(sdepth, trueUV).r;
Expand All @@ -87,6 +88,7 @@ void computeDistorted(in sampler2D sdepth, in sampler2D scolor, in vec2 origUV,
depth = texture(sdepth, trueUV).r;
}
}
#endif

color = texture(scolor, trueUV);
}
Expand Down
2 changes: 2 additions & 0 deletions assets/lumi/shaders/post/normal_preprocess.frag
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void main()

vec2 refraction_uv = vec2(0.5);

#ifdef REFRACTION_EFFECT
if (translucentDepth < solidDepth) {
float ldepth_range = ldepth(solidDepth) - ldepth(translucentDepth);

Expand All @@ -109,6 +110,7 @@ void main()
refraction_uv = REFRACTION_STR * l2_clampScale(0.0, 0.005, ldepth_range) * (viewMNormal.xy - viewVNormal.xy);
refraction_uv = clamp(refraction_uv, -1.0, 1.0) * 0.5 + 0.5;
}
#endif

fragColor[0] = vec4(0.5 + 0.5 * solidNormal, 1.0);
fragColor[1] = vec4(0.5 + 0.5 * solidTangent, 1.0);
Expand Down

0 comments on commit 6598d11

Please sign in to comment.