Image not available

719x731

normalmapAG.png

๐Ÿงต Untitled Thread

Anonymous No. 936606

Why would anyone pack normalmap to AG channels instead RG?

Anonymous No. 936609

>The Green and Alpha channels are used because in the DXT format they are compressed using somewhat higher bit depths than the Red and Blue channels.

http://wiki.polycount.com/wiki/Normal_Map_Compression

Anonymous No. 937093

>>936609
I have no idea who wrote that, but DXT5 isn't used in video games for normal maps, like at all. They aren't wrong in the sense that DXT5 does work like that, but they are wrong in the sense that the solution isn't to swizzle the channels. All modern engines use BC5 for normal map compressions. People should stop taking anything written on polycount as gospel, because that page you posted is wrong.
If you're using say Unreal Engine, don't swizzle the channels like that, please. Just by ticking on normal map when importing the texture it's going to use BC5.

Also using the alpha channel is never a good option because you'll be having an extra draw call.
RGB = 1 draw call, 3 channels
RGBA = 2 draw calls, 4 channels
RGB1, RGB2 (2 textures) = 2 draw calls, 6 channels
Never use the alpha channel, and don't try to use weird tricks like swizzling into the alpha channel unless you're using a shitty engine that uses DXT5 for normal maps

Anonymous No. 937096

>>937093
as a postscript, there is at least one situation where the alpha channel is needed, and that's UI assets that need a transparent background like a button. And particle FX flipbooks too. I mean it's not like the alpha channel is useless, but packing texture channels into it is not a good use case because you're paying for 2 draw calls but you're getting fewer channels than if you used an extra RGB texture

Anonymous No. 937099

>Albedo + RGBA Normal Translucency Smoothness
4 textures, 3 draw calls, potential compression artifacts because you're using DXT for normal maps

>Albedo + RGB normal + RGB translucency smoothness free slot
same draw calls, one free channel for something else, no risk of visible compression artifacts because you'll be using BC5 for the normal map

Anonymous No. 937277

>>937099
You don't need three channels for the normalmap, only two. The third component can be reconstructed from the other two.

Anonymous No. 937300

>>937277
You didn't understand a thing I said. In any non shit engine, normal maps have their own dedicated compression setting (BC5) that you shouldn't touch, because it's already being optimized under the hood.
Let me make it even easier for a mongoloid retard like you to understand. BC5 strips down a texture down to 2 channels. Even if your normal map has 4 channels for some god awful reason when you import it into the engine, and it doesn't even matter which engine it is as long it's a decent one, by telling the engine it's a normal map it's going to internally strip down the channels using 2-component block compression.

You could in theory use the GA channels of a DXT5 compressed texture, but like I said before, you'll have compression artifacts (yes, even using GA) and you're going to incur on more draw calls.

People doing those tricks think they're smart but they really aren't.
Even super optimized games like Valorant, which changed half the shading pipeline in Unreal Engine so that third world computers could play the game at 100+ FPS, still use a traditional, independent normal map texture. Because it's already as optimized as good as it could possibly be.

God damn it I get it that not everyone here is as stupid as you are, but some of you really are a bunch of mongoloids.

Anonymous No. 937302

>>937300
nice blogpost, retard, congratulations on putting your stupidity on display for all of us. No, Albedo + another RGBA map does not produce 4 textures and three drawcalls if your buffers aren't set up like shit and I'll take slight compression artifacts over wasting memory on another texture any day.