diff options
| author | yum <yum.food.vr@gmail.com> | 2024-04-25 15:52:24 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-04-25 15:52:24 -0700 |
| commit | 6eed98ff4e57326ebf7a41f0c180635a7bcac626 (patch) | |
| tree | 67f5e269bafb49608cab8a6b22534d83fd09b58b /pbr.cginc | |
| parent | b9671b47df8b17fa3143d4b0dbdecf9b77cc7607 (diff) | |
Add LTCGI
Also begin trying to fix fallback shaders.
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -57,7 +57,13 @@ UnityIndirect CreateIndirectLight(float4 vertexLightColor, float3 view_dir, floa indirect.specular = 0; #if defined(FORWARD_BASE_PASS) + +#if defined(LIGHTMAP_ON) + // Avatars are not static, don't use lightmap. + indirect.diffuse = 0; +#else indirect.diffuse += max(0, ShadeSH9(float4(normal, 1))); +#endif float3 reflect_dir = reflect(-view_dir, normal); Unity_GlossyEnvironmentData env_data; env_data.roughness = GetRoughness(smoothness); |
