summaryrefslogtreecommitdiffstats
path: root/MochieStandardBRDF.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 /MochieStandardBRDF.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 'MochieStandardBRDF.cginc')
-rw-r--r--MochieStandardBRDF.cginc4
1 files changed, 2 insertions, 2 deletions
diff --git a/MochieStandardBRDF.cginc b/MochieStandardBRDF.cginc
index 2dd5c94..1bf85c6 100644
--- a/MochieStandardBRDF.cginc
+++ b/MochieStandardBRDF.cginc
@@ -86,7 +86,7 @@ half4 BRDF1_Mochie_PBS (
half3 diffColor, half3 specColor, half oneMinusReflectivity, half smoothness,
half3 normal, half3 viewDir, half3 worldPos, half2 screenUVs, half4 screenPos,
half metallic, half thickness, half3 ssColor, half atten, float2 lightmapUV, float3 vertexColor,
- UnityLight light, UnityIndirect gi)
+ UnityLight light, UnityIndirect gi, float reflection_strength)
{
half perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness);
@@ -138,7 +138,7 @@ half4 BRDF1_Mochie_PBS (
diffCol = diffColor * (gi.diffuse + light.color * lerp(diffuseTerm, wrappedDiffuse, thickness));
half3 specCol = specularTerm * light.color * FresnelTerm (specColor, lh) * _SpecularStrength;
- half3 reflCol = surfaceReduction * gi.specular * FresnelLerp (specColor, grazingTerm, lerp(1, nv, _FresnelStrength*_UseFresnel)) * _ReflectionStrength;
+ half3 reflCol = surfaceReduction * gi.specular * FresnelLerp (specColor, grazingTerm, lerp(1, nv, _FresnelStrength*_UseFresnel)) * reflection_strength;
#if SSR_ENABLED
half4 ssrCol = GetSSR(worldPos, viewDir, reflect(-viewDir, normal), normal, smoothness, diffColor, metallic, screenUVs, screenPos);
ssrCol.rgb *= _SSRStrength;