summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-01-27 15:30:46 -0800
committeryum <yum.food.vr@gmail.com>2025-01-27 15:30:46 -0800
commit5f0746ebbf8eb6216281424a4acbefb68dc13c59 (patch)
tree786d7d2c66f5935dce85a876c676ac74238a5acc /pbr.cginc
parentf9eb05f74fd3697f93d3abbdad9e77638eb43651 (diff)
Add ability to swap decal slots
Also: * Rim lighting can disable texture normals * Frame counter is now hidden behind a checkbox, and unconditionally overrides audiolink
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc6
1 files changed, 3 insertions, 3 deletions
diff --git a/pbr.cginc b/pbr.cginc
index ee3d22b..bbb41b3 100644
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -287,7 +287,7 @@ float4 getLitColor(
float sum_brightness = max(brightnesses[0] + brightnesses[1], min_brightness);
float2 brightness_proportions = brightnesses / sum_brightness;
- sum_brightness = smooth_clamp(sum_brightness, min_brightness, _Max_Brightness);
+ sum_brightness = clamp(sum_brightness, min_brightness, _Max_Brightness);
direct_light.color[2] = sum_brightness * brightness_proportions[0];
indirect_light.diffuse[2] = sum_brightness * brightness_proportions[1];
@@ -312,7 +312,7 @@ float4 getLitColor(
// Specular has to be clamped separately to avoid artifacting.
#if defined(_BRIGHTNESS_CLAMP)
- indirect_light.specular[2] = smooth_clamp(indirect_light.specular[2], min_brightness, _Max_Brightness);
+ indirect_light.specular[2] = clamp(indirect_light.specular[2], min_brightness, _Max_Brightness);
#endif
direct_light.color = HSVtoRGB(direct_light.color);
@@ -451,7 +451,7 @@ float4 getLitColor(
LoH,
h,
Fc);
- pbr.rgb += cc_term * (indirect_light.specular + indirect_light.diffuse) * cc_mask;
+ pbr.rgb += cc_term * indirect_light.specular * cc_mask;
}
// Direct
{