Reflection shader with alpha channel

Hello, I’m new to Unity and need to ask a simple question.

I have a 3D mesh with a texture applied to it. Small parts of the texture should be reflective, while the rest should stay non-reflective.

When I however setup a Reflective Bumped Diffuse shader, the entire texture becomes reflective.

Is there any humane way to apply an alpha matte to the reflection in order to specify what parts of the texture it should be applied to? Alternatively, do you know of any custom made shader that could do this?

Any help would be much appreciated.

You are able to use multiple materials in one mesh, but that would require some extra work with getting their textures right. A shader based solution however would indeed be lovely.

Hi there,

I hope this works for you.
The reflective shaders inside unity have the option to be masked with and alpha. The only trick is to embed this alpha mask into the diffuse.

I tried to get the effect a couple of times but I only made it work when I saved my textures as TGA with 32 bit. Check the images below with the same cube and material but the masked and unmasked texture.

Let me know if if works, if you are still confused I could send you a more detailed description or a quick video of what I did.

Cheers.

16757-maskedcube.png