Hello everyone,
I’ve been unsuccessfully trying to fix an issue in our game related to deferred decals.
The point is, I want like to overwrite specular channel with black, so that our decals are not affected by the underlying surface (just like I can do with albedo and normals).
This is the decal on the surface with zero specular:
and the corresponding specular channel:
Now with the underlying surface outputting specular >0:
and the corresponding specular channel:
We’re using an altered version of the deferred decals released by Unity. This version also grabs the “BuiltinRenderTextureType.GBuffer1” channel (specular/smoothness) and writes to it in the decal shader.
This works perfectly, except for surfaces that output specular color >0.
I don’t have deep knowledge of the whole deferred path implementation Unity uses, but from what I’ve seen, it seems that the color I output to the GBuffer1 channel is additively blended with that of the underlying surface.
Shouldn’t the opaque geometry be already drawn in this pass? This works for normals, as the decal shaders blend it’s own normals with the ones already in the GBuffer2.
Is it possible to overwrite the GBuffer1 after all the opaque geometry has output it’s specular color to it?
How is it that this works for albedo/normals?
Thanks in advance to anyone replying. ![]()



