diff options
| author | yum <yum.food.vr@gmail.com> | 2024-10-09 03:44:11 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-10-09 03:44:11 -0700 |
| commit | 5b0b45f9e4892c8e66f36211ebcb1039dd012b1b (patch) | |
| tree | 834e5881829273ec43bf36bee808202a9d5a268d /pbr.cginc | |
| parent | a396182815db14f5a6eed26799dd425506a70686 (diff) | |
Add emitter texture to fog
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -254,21 +254,6 @@ float4 getLitColor( direct_light.color *= (1 - e); } -#if defined(_LTCGI) - ltcgi_acc acc = (ltcgi_acc) 0; - if ((bool) round(_LTCGI_Enabled)) { - LTCGI_Contribution( - acc, - i.worldPos, - normal, - view_dir, - GetRoughness(smoothness), - 0); - indirect_light.diffuse += acc.diffuse; - indirect_light.specular += acc.specular; - } -#endif - direct_light.color = RGBtoHSV(direct_light.color); indirect_light.specular = RGBtoHSV(indirect_light.specular); indirect_light.diffuse = RGBtoHSV(indirect_light.diffuse); @@ -460,6 +445,20 @@ float4 getLitColor( #endif #endif +#if defined(_LTCGI) + ltcgi_acc acc = (ltcgi_acc) 0; + if ((bool) round(_LTCGI_Enabled)) { + LTCGI_Contribution( + acc, + i.worldPos, + normal, + view_dir, + GetRoughness(smoothness), + 0); + pbr.rgb += acc.diffuse + acc.specular; + } +#endif + UNITY_APPLY_FOG(i.fogCoord, pbr.rgb); return float4(pbr.rgb, albedo.a); |
