It reads fine for me. Haha. Yeah, it’s a bit messy. Lemme break it down.
The distance based tessellation controls for distance and has a hard switch to turn it off. It’s based on camera direction and object distance, the ‘object’ in question being the landscape components. This seems to work quite well, the only issue being that cracks are popping up at the edges of the components, which I’ll fix at some point. Crack free displacement just breaks tessellation. I could do a pixel depth call, but that’s a lot of per frame calculations, so it’s probably cheaper to be loading per landscape component. If anyone thinks there’s a better version, I’d love to hear it. I’m compiling available landscape knowledge and putting it into a cheat sheet pdf. There aren’t a lot of resources on controlling things for distance.
The diffuse maps have the tessellation heightmaps, or in a few cases the roughness maps in their alpha channel. Most of the roughness and metallicity calculations are just maths from multiplying the rgb channels.
The normal maps are pretty straightforward, though there’s two vectors controlling some broken normals, I haven’t scrubbed them clean with nvidia yet, so I’m just getting rid of false shadowing till I get to that.
The tessellation is individually controlled with scalars multiplying the alpha channels from their respective diffuse maps. This is then plugged into the distance tessellation calculation so that they’re globally cut off at the right distance.
The texture scale is controlled by multiplying the landscape co-ordinates with scalars. I’ll cut them down when I have a better idea of how large the different textures need to be.
The mess you can see is the roughness and metallicity controls. They don’t have any samplers and are just maths. So they’ll mostly just be confusing if I tried to screenshot that. The path material is also maths, and shouldn’t be a concern.
Also. The reason I’m saying it’s tessellation:
Disconnect a node. Doesn’t matter which one. Or whether it’s a separate wrap sampler. The material compiles fine.
Connect it. It dies. This doesn’t happen with any other part of the material. Both the diffuse and normals will compile fine if I add more samplers, they don’t cause a hitch. It’s only the moment the extra node is attached to the tessellation landscape layer blend. Both diffuse and normal have much more nodes on their blends as well, mostly because I’m not tessellating all the materials.