Use World Position.xz for texture sampling?

I would know how to make a custom shader for this but I was wondering if anyone can think of an easy way to do this with a full PBR material. Ideally it would be a PBRCustomMaterial or one of the new Materials classes we have to make custom mats.

I was also thinking because the mesh in question is static, at runtime I could update the uv0 buffers to the global position of the vertex and that would work right out the box with the normal material.

Just looking for opinions and ideas.

This is basically what I would think is easiest for a static mesh, but again looking for ideas.

@Evgeni_Popov might know? :thinking:

One way would be to override the vMainUV variable at the end of the vertex shader.

Here’s a modified PG that is doing this by mean of a material plugin:

3 Likes

Perfect, that is kind exactly what I was looking for! Im glad you did it with the new material thing, I’ve been meaning to learn it. Thank you Evgeni <3.