The question is in the title. There's already a similar thread with no replies, but it's in a wrong forum section and is obviously dead. I can't find a meaning of the "_TextureSampleAdd" shader variable. It's documented nowhere. I see that in the default UI shaders it's a 4d vector and that it simply offsets a texure's RGBA values. But why is it used in the 1st place? What is it used for? What does it do when it's added? It's very important to understand it's purpose for any non-Alpha-blended UI shaders. E.g., for additive or multiply blend modes. I'm really confused at which stage I need to use _TextureSampleAdd and how exactly.
Hi! This is set automatically by the engine based on whether the texture being used for the UI is in Alpha8 format or not. If it is, it's set to (1,1,1,0), otherwise it's (0,0,0,0).
@aleksandrk Thanks a lot! In other words, if I handle Alpha8 texture myself, I don't need it at all. I was woindering it's purpose since it appeared (like, since 5.x). And now I can safely remove it. I guess, this info could be added to official docs.
Hello there. Sometimes after build all my UI texts becomes black. Other UI components (like images) using the same materials works fine, so I ended up since '_TextureSampleAdd' seems the only variant. Recompiling shaders solve the problem but is not a very straight forward solution. Is there any permanent fix? I'm on 2019.4, but this issue was present over the years and several editor versions.