Page 1 of 1

Translucency or Transmission in Deferred rendering

PostPosted: Mon Feb 11, 2019 10:00 pm
by DuvE
Hi,

I'm trying to create a Grass shader with ASE. Usually, grass shaders have Transmission, but it seems that you can't use either Transmission or Tranclucion in Deferred rendering. When using Custom Lighting the shader become Deferred too. Is there a way to create Transmission effect in a deferred shader?

Re: Translucency or Transmission in Deferred rendering

PostPosted: Thu Feb 14, 2019 3:21 pm
by Amplify_Borba
Hello, just to clarify our Custom Lighting is Forward only, so it won't be possible create a deferred shader.

We've previously shared a solution on how to replace Unity's own grass shader in this post, but it seems that you're looking for something more specific.

Could you please elaborate on how what sort of implementation you're looking into?

Re: Translucency or Transmission in Deferred rendering

PostPosted: Thu Feb 14, 2019 9:16 pm
by DuvE
Basically, I want to create a simple Standart shader with Transmission in Deferred. I/m placing grass in my project with particles, not with Grass tool from the terrain. Here is the shader in Forward mode and I need this shader in Deferred. I've also changed by hand how Transmission work.

From:

half3 transmission = max(0 , -dot(s.Normal, gi.light.dir)) * gi.light.color * s.Transmission;

To:

half3 transmission = gi.light.color * s.Transmission;

I was trying to change the whole inline half4 LightingStandardCustom(SurfaceOutputStandardCustom s, half3 viewDir, UnityGI gi ) function to same for a Deferred mode (with this manual https://docs.unity3d.com/Manual/SL-Surf ... hting.html), but failed.

Re: Translucency or Transmission in Deferred rendering

PostPosted: Fri Feb 15, 2019 9:53 am
by Amplify_Borba
Unfortunately I don't believe that you can do this with Unity's deferred rendering path, since it does not support it, you would have to create a custom deferred shading model to replace Unity's built-in, but this is outside of the scope of ASE.

In short, ASE only supports the authoring of shaders with Translucency and Transmission in Forward.