diff options
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -245,7 +245,8 @@ float4 getLitColor( direct_light.color *= (1 - e); } -#if 0 && defined(_LTCGI) +#if defined(_LTCGI) +#if !defined(LIGHTMAP_ON) && !defined(_FORCE_WORLD_LIGHTING) ltcgi_acc acc = (ltcgi_acc) 0; if (_LTCGI_Enabled_Dynamic) { LTCGI_Contribution( @@ -259,6 +260,7 @@ float4 getLitColor( indirect_light.specular += acc.specular; } #endif +#endif #if defined(_BRIGHTNESS_CLAMP) || defined(_PROXIMITY_DIMMING) direct_light.color = RGBtoHSV(direct_light.color); @@ -382,7 +384,8 @@ float4 getLitColor( #endif -#if 1 && defined(_LTCGI) +#if defined(_LTCGI) +#if defined(LIGHTMAP_ON) || defined(_FORCE_WORLD_LIGHTING) ltcgi_acc acc = (ltcgi_acc) 0; if (_LTCGI_Enabled_Dynamic) { LTCGI_Contribution( @@ -392,9 +395,10 @@ float4 getLitColor( view_dir, 1.0 - smoothness, i.uv2); - pbr.rgb += acc.diffuse * pbr.rgb + acc.specular; + pbr.rgb += (acc.diffuse * pbr.rgb + acc.specular) * albedo.a; } #endif +#endif // TODO formalize with parameters // Break up color banding by adding some dithering to shaded color. |
