diff options
| author | yum <yum.food.vr@gmail.com> | 2025-06-23 00:40:33 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-06-23 00:40:33 -0700 |
| commit | 6576484d1f9f1407fc40d36a1d46f5232869926c (patch) | |
| tree | 3dade4e75ef55d72cfc30d9fc577abbb4b29ce95 /yum_lighting.cginc | |
| parent | 5393f1c9a3b6cfeae53ebba4fb10f4eb6d91fbf7 (diff) | |
add support for bakery normal maps
Diffstat (limited to 'yum_lighting.cginc')
| -rw-r--r-- | yum_lighting.cginc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/yum_lighting.cginc b/yum_lighting.cginc index 22d1a0b..9dab2d8 100644 --- a/yum_lighting.cginc +++ b/yum_lighting.cginc @@ -241,7 +241,8 @@ YumLighting GetYumLighting(v2f i, YumPbr pbr) { float3 tangentNormal = mul(pbr.normal, transpose(float3x3(i.tangent, i.binormal, i.normal))); float3x3 tangentToWorld = float3x3(i.tangent, i.binormal, i.normal); - light.diffuse = UnityGI_Irradiance( + // Use Bakery-aware irradiance function + light.diffuse = BakeryGI_Irradiance( pbr.normal, // worldNormal i.worldPos, // worldPos float4(i.uv01.zw, 0, 0), // lightmapUV (xy = uv0, zw = uv1) @@ -249,13 +250,6 @@ YumLighting GetYumLighting(v2f i, YumPbr pbr) { light.attenuation, // attenuation tangentNormal, // tangentNormal tangentToWorld, // tangentToWorld - #if defined(USING_BAKERY_VERTEXLMSH) - // You'll need to add these to your v2f if using Bakery vertex SH - i.bakeryVertexSH, - #elif defined(USING_BAKERY_VERTEXLMDIR) - // You'll need to add this to your v2f if using Bakery vertex directional - i.bakeryVertexDir, - #endif light.occlusion, // out occlusion light.derivedLight // out Light ); |
