Post B0ley3WRMEHYNvZJXU by dotstdy@mastodon.social
 (DIR) More posts by dotstdy@mastodon.social
 (DIR) Post #B0lexxugDC6ezMraUK by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T05:12:34Z
       
       0 likes, 0 repeats
       
       GDC 2015: "Adaptive Virtual Texture Rendering in Far Cry 4" by Ka Chen of Ubisoft https://gdcvault.com/play/1021760/Adaptive-Virtual-Texture-Rendering-inThe problem they were trying to solve was that they wanted thousands of decals in the terrain on-screen at a time. This is enough decals that you can't render them individually every frame. So instead, you render them once into a texture, and then render that every frame.And of course you want these temporary textures to behave like a cache: you can recreate them whenever you want...1/5
       
 (DIR) Post #B0lexzQyYbXBhoytSy by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T05:16:42Z
       
       0 likes, 0 repeats
       
       ... and you want old ones to age-out automatically.This is the classic use case of virtual textures - your physical texture acts as a cache, and you populate tiles in it as necessary. For their game, they chose the flavor of virtual textures where the physical texture doesn't have any mipmaps, and miplevel is part of the indirection data.They did something else that I found interesting (and, if I'm being honest, questionable): they didn't give their virtual texture mipmaps.2/5
       
 (DIR) Post #B0ley0jni6BdkUnRRo by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T05:23:51Z
       
       0 likes, 0 repeats
       
       But they wanted the benefits of mipmaps.So instead, they flattened all the regions of their desired virtual miplevels (that they don't actually have) into *regions* of a single 2D full-resolution virtual miplevel. And I guess they must have had a second indirection texture? Though they didn't mention this.I don't know why they made that decision; it seems like they're reimplementing mipmaps themselves in software, which just seems like a bad idea?3/5
       
 (DIR) Post #B0ley1ktvUf2uCJpnk by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T05:27:47Z
       
       0 likes, 0 repeats
       
       The presentation walked through the case where you need to generate a higher-res miplevel than the one you already have (because the camera moved forward or something) - this can be really fast because most of the data you want is already present in the physical texture, so most of the work is actually just messing with your (first) indirection texture.They gave performance figures and screenshots with the feature on & off, and discussed how to handle trilinear & anisotropic filtering.4/5
       
 (DIR) Post #B0ley2cmh9lLbJWrmy by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T05:29:36Z
       
       0 likes, 0 repeats
       
       Review: 4/10 They gained a point for the topic being well-presented (screenshots, perf numbers, visualizations) but I can't recommend it because it doesn't make any sense to me to suballocate out of your virtual texture. The whole point of a virtual texture is that you shouldn't need to suballocate out of it.
       
 (DIR) Post #B0ley3WRMEHYNvZJXU by dotstdy@mastodon.social
       2025-11-30T08:20:50Z
       
       0 likes, 0 repeats
       
       @GDCPresoReviews not sure I get your meaning there, sub-allocation is always required if you're using a virtual texture as an atlas?
       
 (DIR) Post #B0ley4PO3wEb8LHCBU by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T09:59:49Z
       
       0 likes, 0 repeats
       
       @dotstdy Oh, I mean like flattening all the virtual miplevels into a single miplevel, thereby (I'm assuming) requiring 2 indirection texturesThe way they explained it was that they wanted a 1:1 correlation between the virtual texture and the world terrain, and their virtual texture only has a single mip, but using that mip's pixel density would too high-detail for far-away terrain, so they dynamically allocate regions from the one mip and use those regions as-if they had lower pixel density
       
 (DIR) Post #B0ley5Q8IeQQGwdIzA by GDCPresoReviews@mastodon.gamedev.place
       2025-11-30T10:00:12Z
       
       0 likes, 0 repeats
       
       @dotstdy And I'm like "that's exactly why miplevels exist, so you don't have to do that"
       
 (DIR) Post #B0ley6ixS94sJcRqy0 by ignaloidas@not.acu.lt
       2025-11-30T10:03:18.279Z
       
       0 likes, 0 repeats
       
       @GDCPresoReviews@mastodon.gamedev.place @dotstdy@mastodon.social I guess this way you don't pay for the mip levels you don't use? Still quite strange though