Your comments
11 years ago
It's because the node previews don't support real-time updating, although it should probably be some value other than 0
I can't reproduce this. Could you do a step-by-step guide?
Oh, I thought you had to use matrices in order for that to work? Could you show a screenshot?
This may come at some point, but it's not of high priority at the moment! It would be nice to have the matrix data types :)
When the textures are added into Unity, and are marked as normal map, Unity will pack it into a new texture, where it does this:
R -> G
G -> A
B -> -
A -> -
It puts the red channel in the green channel of the new texture.
It puts the green channel in the alpha channel of the new texture.
It dumps the data in B and A.
When it's in the shader, the normal is unpacked using G and A, and then it reconstructs the Z (B) channel of the normal map. Unity does this to increase the precision and quality of the normal maps, but the data in the alpha channel is lost in the process.
You can do your own normal map unpacking. If you add a Texture 2D node, and use a texture that isn't marked as a normal map in the texture import setting, and don't mark it as a normal map in the Texture 2D node either, you can unpack RGB using the Remap node (R + LMB), set it to [ 0 to 1 ] -> [ -1 to 1 ], and then plug it into the normal input. With this approach, you're saving the alpha channel as well :)
Hope that answered your question!
R -> G
G -> A
B -> -
A -> -
It puts the red channel in the green channel of the new texture.
It puts the green channel in the alpha channel of the new texture.
It dumps the data in B and A.
When it's in the shader, the normal is unpacked using G and A, and then it reconstructs the Z (B) channel of the normal map. Unity does this to increase the precision and quality of the normal maps, but the data in the alpha channel is lost in the process.
You can do your own normal map unpacking. If you add a Texture 2D node, and use a texture that isn't marked as a normal map in the texture import setting, and don't mark it as a normal map in the Texture 2D node either, you can unpack RGB using the Remap node (R + LMB), set it to [ 0 to 1 ] -> [ -1 to 1 ], and then plug it into the normal input. With this approach, you're saving the alpha channel as well :)
Hope that answered your question!
Customer support service by UserEcho