I have a bunch of materials that tile in world space so the textures stay at a uniform scale when you change the mesh’s scale. Everything was working fine, but I just discovered that if I mirror the mesh, the normals all get reversed. It would be a huge pain for me to try to find every mirrored mesh and unmirror it now. Do you know of a way for a material to know if its mesh has been mirrored? If that’s possible, I’ll just flip the normals in the material.
Turns out it wasn’t that bad finding all of the mirrored meshes. I set a material instance so that the flipped normal would be more obvious, and I went and replaced all of those meshes’ materials with a flipped-normal version of the offending material.
Still, if any of you know how to make a material aware if its mesh has been flipped, I’d be interested in knowing.
Try this. Vector transform will get you DrawSize of your mesh. Then you just need to check if it’s positive in all directions, I guess.
Wow. I actually didn’t think this was possible. Thanks!