From 54cf2749759045b646282c5e28139510d3e7783e Mon Sep 17 00:00:00 2001 From: yum Date: Fri, 4 Oct 2024 16:38:29 -0700 Subject: 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 --- MochieStandardBRDF.cginc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MochieStandardBRDF.cginc') 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; -- cgit v1.2.3