Your comments

Any update on this?

Great guide! Helped me a lot! Thanks for all the extra details too, really clears things up.

I stumbled upon this thread while looking for a way to "sneak in" a roughness texture through my normal map nodes.


I'm working on a shader that requires many texture nodes, and in order not to hit the cap I'm trying to use one of the normal map channels for roughness values.

I was trying to reconstruct the process of checking the "normal map" tick box on a texture node in order to have access to all the individual channels. I'm no expert so that lead me in many directions. In the end this is what I made:


The result is basically identical to simply using the tickbox. There are some extremely minor differences in intensity, but the normal appears to be accurate.


My original goal was to use the alpha channel of the normal map as my roughness channel. However after figuring this out, I realized the channel I end up not using is actually the blue channel. I understand why the blue channel is less critical for a tangent space normal map, however I'm not sure it's entirely useless and I'm not sure how much of an impact using it as a roughness channel would have on my normals.


Testing shows there's literally no difference, making it possible for me to simply use the tickbox instead of this workaround. But I wanted to make sure using the blue channel is safe.

Also I'm interested to know if my calculation above is indeed accurate or is it lacking in some way? since I do get slight differences in values in the final result.

EDIT:

After rethinking it, I guess I do have to use the workaround because ticking the box doesn't reveal the actual blue channel of the texture, but the reconstructed one of the unpacknormal function.

So the only question I have is regarding using the original blue. Doesn't it contain some important data?

Is this something that could be added in a future version?

So far I'm getting by pretty well with overblowing the roughness.

Yes, for this specific purpose I'm looking for a way to eliminate ALL contributions from the shader and dip it to black/white/any other color, outputting a perfectly flat result with the chosen color.


I'm making a shader that will mask out shading contributions based on world position, for example to show everything below a certain depth as black/atmosphere color.

Tried doing that, the result isn't accurate.
Maybe I'm doing something wrong?
Awesome! I've wondered if it'll get implemented and very happy to see its here :)

I'm the OP of this, can't login to that user anymore.
Thanks!