summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-11-11 20:30:19 -0800
committeryum <yum.food.vr@gmail.com>2025-11-11 20:30:19 -0800
commit73686635d2e82659853a227338f0a826e32c3ab2 (patch)
tree1226756792776b41b1ee64c932ca225e919fcfe9
parentc8c4b2e7cf58e7813bebf80e43426e3b32bf1ff0 (diff)
lighting tweaks - fix point/spot in domain shader, fix falloff
-rw-r--r--3ner.cginc2
-rw-r--r--lighting.cginc3
2 files changed, 1 insertions, 4 deletions
diff --git a/3ner.cginc b/3ner.cginc
index ca21ac3..4df5366 100644
--- a/3ner.cginc
+++ b/3ner.cginc
@@ -195,8 +195,6 @@ v2f domain(
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#if defined(SHADOW_CASTER_PASS)
//TRANSFER_SHADOW_CASTER_NORMALOFFSET(o);
-#else
- TRANSFER_SHADOW(o);
#endif
return o;
}
diff --git a/lighting.cginc b/lighting.cginc
index 8d51cda..d72540d 100644
--- a/lighting.cginc
+++ b/lighting.cginc
@@ -87,8 +87,7 @@ float getShadowAttenuation(v2f i)
float4 getDirectLightColorIntensity() {
// Properly separate light color from intensity like filamented
if (_LightColor0.w <= 0) return float4(0, 0, 0, 0);
- _LightColor0 += 1e-6f;
- return float4(_LightColor0.xyz / _LightColor0.w, _LightColor0.w);
+ return float4(_LightColor0.xyz, _LightColor0.w);
}
float3 getIndirectSpecular(v2f i, float roughness, float3 view_dir, float3 reflect_dir) {