From 6c1e463a846292a55cf10db772741cea657f298f Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 20 Jul 2024 01:46:51 -0700 Subject: Add second mask to matcaps Useful for PBR overlay. --- pbr.cginc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pbr.cginc') diff --git a/pbr.cginc b/pbr.cginc index 9710ff5..d458aca 100644 --- a/pbr.cginc +++ b/pbr.cginc @@ -139,11 +139,10 @@ UnityIndirect CreateIndirectLight(float4 vertexLightColor, float3 view_dir, floa env_data.reflUVW = BoxProjection( reflect_dir, worldPos, unity_SpecCube1_ProbePosition, - unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax - ); + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz); float3 probe1 = Unity_GlossyEnvironment( UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), - unity_SpecCube0_HDR, env_data + unity_SpecCube1_HDR, env_data ); indirect.specular = lerp(probe1, probe0, unity_SpecCube0_BoxMin.w); } -- cgit v1.2.3