Hello.
A few words about what I’m trying to do. I was experimenting with making a project for Oculus Quest 2, and stumbled across an issue, which is - decals don’t work properly with forward rendering.
My idea of a solution was to make similar functionality with materials. I should clarify, that I don’t need to spawn these decals during gameplay, I only want to set them up initially for various objects, from their respective material instances, by providing world coordinates.
At first I tried doing it with just adding values to AbsoluteWorldPosition, feeding it to the UV input of the decal texture sample, and multiplying it by the actual object’s material, which worked fine, until I tried to rotate the mesh, and realised that the decal texture stretches vertically.
While trying to solve that, I found this material function, WorldAlignedTexture, and it seemed to do everything I wanted it to do… Until I realized that it tiles the texture, even though the texture’s tiling is set to clamp.
Hence the question, is it possible to modify this function, so that it would stop tiling the texture?