Yes, it is possible to use derivative based surface normals as the input for triplanar mapping. Can you show the code you’re using? Or is this a Shader Graph?
Thank you so much for the quick reply - it was just what I needed to encourage me to keep pushing on this! I think I solved it. (Amplify Shader Editor graph screenshot attached.)
I worked through your excellent article on triplanar normal mapping - (I think I chose the least efficient option you provided). The missing piece, for me, was in my understanding of how to get the triplanar mapping to use the reconstructed normals. It took me all day to realize that the “World Normals” input on ASE’s Cotangent Frame function would accept the reconstructed normals rather than the actual world normals. Figuring out what the triblend was and how to create it in the graph also took me some time (and is it even necessary?). But, my personal Eureka moment came when I finally understood that I could use the world space UVs as the actual UVs for the texture samplers. To anyone else, this would have been obvious - but it takes a while for me to figure these things out.
Here it is working correctly on my test model (ignore the banded shading on the ends - that’s poor shadow settings). The mesh has no normals, no tangents, no UVs; just verts, triangles, and vert colors. I’m pretty pleased. We’ll see how it runs in-game applied to hundreds of meshes, of course …
So, it’s been a while (3 years) aannndd … the banding is back! (Which is not the desired effect.).
The banding/smearing happens when an object gets batched. I’m still using the exact same shader as shown in the graph in the above post. That shader’s world-space UVs seem to be working, but the dynamic batching seems to break that.
Any ideas why dynamic batching would break world-space UVs and how to fix that?
Dynamic batching merges all batches meshes into world space. World space UVs will still work, but you’re more likely to have precision issues on batched meshes as you get further away from the world origin.