summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-10-04 16:38:29 -0700
committeryum <yum.food.vr@gmail.com>2024-10-04 16:40:24 -0700
commit54cf2749759045b646282c5e28139510d3e7783e (patch)
tree87b3ca6906bc7e50d5863d66eeb24b40a592b059 /pbr.cginc
parent2abd9eab29964137a9b77365486aaa210b9217f5 (diff)
Add audiolink chroma gimmick
Enable displaying chroma as a solid color on the base/forward pass and/or the outline pass. Also: * add optional mask for mochie reflection strength * update README with dev instructions
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc7
1 files changed, 6 insertions, 1 deletions
diff --git a/pbr.cginc b/pbr.cginc
index 44c0db6..9955d0d 100644
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -337,6 +337,10 @@ float4 getLitColor(
float2 screenUVs = 0;
float4 screenPos = 0;
#if 1
+ float reflection_strength = _ReflectionStrength;
+#if defined(_REFLECTION_STRENGTH_TEX)
+ reflection_strength *= _ReflectionStrengthTex.SampleLevel(linear_repeat_s, i.uv0, 0);
+#endif
float4 pbr = BRDF1_Mochie_PBS(
albedo,
specular_tint,
@@ -354,7 +358,8 @@ float4 getLitColor(
i.uv2,
vertexLightColor,
direct_light,
- indirect_light);
+ indirect_light,
+ reflection_strength);
#else
float3 pbr = UNITY_BRDF_PBS(
albedo,