Anyway to make world space aware UV coordinates for displacement/normal?

Hi,
I want to make a world space aware UV coordinates, so that after non-uniform scaling operations the tiling texture is still correctly applied.
I’ve managed to create something


The problem is with displacement and normal textures because I’m using a pixel shader parameter here, and displacement is probably done in the domain shader which is earlier in the pipeline and doesn’t have access to this parameter yet, and normal also doesn’t work for some reason.
So is there any way to fix that?
Thanks,

1 Like