So I finally have the time to improve upon the material in this package.
It took quite some thought and a few iterations but I am rather proud of the result:
Old shader instructions:
https://i.gyazo.com/1bc98210954ea8784ee2388cc6923549.png
new shader instructions:
https://i.gyazo.com/fd8b6db610fe549604b51ef46715a71a.png
This improvement is mainly by moving a lot of the uv-related math to the vertex shader (custom uv’s), overhauling the material functions, and fixing some things I did not have a clear understanding of back in the day.
I will try to keep as much as the variable names identical, but trying to support all the potential old stuff would result in a lot more instructions.
Because of that I took the liberty to remove some variables, combine some variables, and create a few new ones.
While this might break some stuff for people using and tweaking the material instances, recreating the settings should be faster due to less options that are more accurate.
In addition to this, it will now be way more optimal to merge meshes and reduce draw-calls as all meshes can now use the same material without needing an assortment of instances. (HLOD)
another improvement is the way I use pixeldepth to blend the texture in the distance to reduce tiling, resulting in a sharper texture up close (old shader started blending in right in front of the camera, while now it takes a (variable) 1000 units before it does so.
And the last improvement is less noise in the roughness and normal shader related math, resulting in a slightly more crisp experience.
Old material overview:
https://i.gyazo.com/22925f05d2d3634b1cef33771f4de620.png
new material overview: (still needs some final tweaks, cleaning up, and rename some variables)
https://i.gyazo.com/83a2eb9035d487e9e90153443c1d3daf.png
I expect to finish this tomorrow and will submit this asap. (for 4.19 and up)
I also considered the LOD situation, but truth be told, with how low poly these meshes already are I fear for more overhead, with so many meshes all of them having multiple LOD’s might not be worth it, especially considering these are caves with windy halls, so in most cases these meshes are already culled way before LOD2 or LOD3 would kick in, especially if an environment artist knows what they are doing and culls entire cave sections when they are not in view.
As for tessellation, while I am still considering to at least provide a “experimental” material that has tessellation available, these meshes are too low poly to really make use of this.
I would need to edit all the meshes to have more polygons and significantly improve smooth out the polygon density, which is not something I want to do, or have time to do.
I’d have to redo the uv’s of 500 meshes, each containing 3-4 uv-channels worth.
Not to mention, I’d need to make sure people not wanting more polygons still have access to the old meshes, meaning I’d have to double the amount of meshes.
It might be more beneficial to try and use parallax occlusion mapping, but that would also intensify the instructions of the shader by a LOT.