Was thinking again a while ago what waste PBR textures can be under most lighting.

Kind of weird to do a 4x texture memory increase - assuming BC1-5 and no alpha/metalness, e.g. BC1 base color + BC5 normal map & BC4 roughness - that will only show up under specific lighting conditions and elsewhere appears flat.

Though doubling texture resolution in both dimensions is also a 4x increase that might never show up (esp. with upscaling) so all things considered, maybe 4x isn't that bad.

#gamedev

@archo Yeah but at sensible resolutions, the higher-rez textures will never be loaded. So all they're wasting is disk space and their own production time. Whereas PBR is burning my precious DRAM for minor LSB differences. Boooooo.

(I say this with honest love to all my PBR shader writers)

(it's a joke. This is a bit)

(or is it)

@TomF Texture loading time from disk and download time/bandwidth would be wasted as well, which seems relevant with modern 150 GB games. (Also not a lot of such games fit on 1 TB consoles.)

But I suspect for high res textures there could be a way to stream the biggest mips on-demand from the CDN to the GPU based on what the GPU needs which AFAIK nobody's doing yet. PBR seems uniquely disadvantaged in this regard (but at least the number of parameters doesn't seem to be growing infinitely).

@archo @TomF cod already does network streaming for high res mips :')
On Demand Texture streaming - How we made all our Cod's fit on one PS4

YouTube

@dotstdy @TomF IIRC there was also some software that used a virtual file system to download Steam game files on-demand (I forgot the name), which together with local mip streaming from separate files would work similarly.

The part I was specifically thinking nobody's done yet was detecting which mips are actually being requested by the pixel shader. It seems this wasn't mentioned in the video but I'm curious if they've been experimenting with something like that as well.

@archo @dotstdy It's called "virtual texturing" and it's been tried many ways over the years. My favourite talk is this one by Sean Barrett: https://www.youtube.com/watch?v=MejJL87yNgI

Also called "megatextures" and implemented in the "id Tech 5" engine and used in a bunch of games, most notably Rage.

I don't remember if it's persisted in newer engines like UE5. There's a certain overhead to using it, and I think most of the time analytic solutions are just as effective and cheaper e.g. https://tomforsyth1000.github.io/blog.wiki.html#%5B%5BKnowing%20which%20mipmap%20levels%20are%20needed%5D%5D

Virtual Textures (aka Megatextures) talk (2008)

YouTube
@TomF @archo @dotstdy we use it extensively in ue5, it's a lot cheaper now there is first class hardware support and saves me a lot of work
@1st_C_Lord @archo @dotstdy You don't see it pop in annoying ways? Is this another case where TAA hides the sins? :-(
@TomF @archo @dotstdy there is cases where you can catch it streaming in but unreal's traditional mip level streaming is much worse anyway
@1st_C_Lord @archo @dotstdy That's pretty impressive - well done.