diff options
| author | yum <yum.food.vr@gmail.com> | 2024-06-15 17:49:14 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-06-15 17:49:14 -0700 |
| commit | 46fab0a9c4eee236f15f35296d49d72ab4aefdb9 (patch) | |
| tree | 74e7fb62147885a953c426838349a4b2664b0f73 /pbr.cginc | |
| parent | 1b3623383d246be29ae9bbb7db904290f02f284a (diff) | |
More LTCGI tuning
Matches the visual behavior of mochie now.
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -204,8 +204,8 @@ float4 getLitColor( } #if defined(_LTCGI) + ltcgi_acc acc = (ltcgi_acc) 0; if ((bool) round(_LTCGI_Enabled)) { - ltcgi_acc acc = (ltcgi_acc) 0; LTCGI_Contribution( acc, i.worldPos, @@ -213,6 +213,8 @@ float4 getLitColor( view_dir, 1.0 - smoothness, 0); + direct_light.color += acc.diffuse; + direct_light.color += acc.specular; indirect_light.diffuse += acc.diffuse; indirect_light.specular += acc.specular; } @@ -245,6 +247,10 @@ float4 getLitColor( indirect_light).xyz; } +#if defined(_LTCGI) + pbr.rgb += (acc.specular + acc.diffuse) * metallic; +#endif + return float4(pbr, albedo.a); } |
