summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-07-20 01:46:51 -0700
committeryum <yum.food.vr@gmail.com>2024-07-20 01:46:51 -0700
commit6c1e463a846292a55cf10db772741cea657f298f (patch)
treef04f1171ba478adf570094cdb0f16cd2dd393406 /pbr.cginc
parent0592c85cd172369625e084be6b037f8c122cbf16 (diff)
Add second mask to matcaps
Useful for PBR overlay.
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc5
1 files changed, 2 insertions, 3 deletions
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);
}