0
Completed
RGBA output for Texture2D
The Texture2D allows the alpha to be used on it's own, but not as a full RGBA Vector 4. Quite often when performing blending I need to do the same operations to all four channels and while I can do that by doing the operations on RGB and on the Alpha that seems needlessly repetitive and inefficient. This could be sorted by an 'RGBA' output being added to the Texture2D, although some changes to nodes such as Component Mask would also likely be needed to act on Vector4s.
Answer
0
Answer
Completed
Freya Holmér (Developer) 11 years ago
You can already do that, and the component mask supports 4 component vectors too :)
Answer
Completed
You can already do that, and the component mask supports 4 component vectors too :)
Ah, excellent! I had used the Append node before but hadn't thought of using it for this.
Thanks
Thanks
I use a lot of information in my alpha channels, so I use this trick too a lot - I must say that having the option to get the full vector4 directly would be nice :)
Mostly when mixing two or more textures together to get the mixed RGBA to use again further down the chain.
For instance, today I did a splat-map shader and I wanted the to multiply each channel of the splatmap with a unique tiled texture to get the resulting RGBA, since the Alpha channel of the tiling textures contained spec values, I wanted it to get the same input multiplication so the spec values could be obtained with the same splatting.
In the same shader I wanted to lerp two color inputs together, and I also wanted the resulting alpha value to affect the shader as well.
I could of course use an extra chain with the same nodes for just the alpha, but since I often want to do more things to the information such as adding it together, multiplying by a value and so on, keeping it in vector 4 makes it simpler and also makes it as few nodes as possible on the board.
It's not a biggie using an append node, but since the data is an RGBA to begin with it feels a bit weird that I need to first append the data together. :)
For instance, today I did a splat-map shader and I wanted the to multiply each channel of the splatmap with a unique tiled texture to get the resulting RGBA, since the Alpha channel of the tiling textures contained spec values, I wanted it to get the same input multiplication so the spec values could be obtained with the same splatting.
In the same shader I wanted to lerp two color inputs together, and I also wanted the resulting alpha value to affect the shader as well.
I could of course use an extra chain with the same nodes for just the alpha, but since I often want to do more things to the information such as adding it together, multiplying by a value and so on, keeping it in vector 4 makes it simpler and also makes it as few nodes as possible on the board.
It's not a biggie using an append node, but since the data is an RGBA to begin with it feels a bit weird that I need to first append the data together. :)
+1 for an extra RGBA output for similar reasons, I have been doing a few splat/verterx blended shaders (very glad I found this Append idea - can't believe I didn't think of it) but it would make the network a tiny bit cleaner etc.
Customer support service by UserEcho