Correct Specular For Transparent Shader

Hi Guys,
Is it possible to achieve correct specular behaviour for transparent shader?
You can see in attached image that the specular is still visible in the area where the light supposed to be occluded.
Well i’m not looking a shadow for transparent shader, i know it’s the limitation of deffered renderer CMIIW, but how about specular for transparent shader, is it possible? is there any way to solve this.

Thanks

Specular highlights is just a matter of lighting function with surface shaders.
Unity provided blinnphong and general phong shading formulas around the web has some strange artifacts when undesired from some angles.
Try blinn, or smiliar lighting functions according to your situation.

[Advertisement]
Or you can buy my shader pack which i already included the solution :stuck_out_tongue:

Eh, i’m not talking about the spec angle actually (or did i??).
I mean is something like this picture
in this one i use standar specular shader while in my previous pic i’m using transparent spec.
As you can see the specular is not visible in the area where the light is occluded.
So yeah, same question. is it possible to achieve the same spec behaviour for transparent shader?

Your correct question should be; why shadows dont work with transparent objects.

If it suits your needs, try to use cut-out specular shader. If not, you must do your own shadow mapping.

Ah i see, so it depend on the shadow isn’t?. I thought there is another way to achieve this without shadow on transparent shader

Well, in the situation you posted its related to shadows.
Or you can also make a custom transparent shader that also accepts an occlusion texture as well and that way you can block the specular highlights too.

Edit: Also there might be another way to change shadow casting and recieving or maybe lightmaps can be involved but i never messed with those yet, so i wouldnt know.
Maybe someone else does?

Edit2: Also an image effect might also solve this problem but wouldnt give nice results i suppose.

IF you are writing your own custom lighting, try the following logic to implement fake light occulusion for the specularity

if (s.albedo + lightcolor0.rgb <= 0) spec = 0;