I have been working with a way to modify a mesh vertex depending on the heightmap specified. So far it works, but it doesn’t give any smooth vertex positioning. Here’s what I mean:
Off the top of my head, one of two possible things are happening:
the texture is being point sampled – if it’s an editor resource, double check your filter mode is at least bilinear. If it’s generated at run time as a texture2D OR rendertexture, then set it to be x.filterMode = FilterMode.Bilinear;
the bit depth isn’t sufficient to reproduce the forms (eg, it’s quantized). Make sure it’s of a format that represents the bit depth you need.
There’s one last possibility, but it’s a real edge case - quantized UV’s from compressed UV packing or floating point innaccuracy. This can occur when UV’s are super far away from 0,0.
#1 fixed my issue. My texture filter mode is set to bilinear in the editor, but since I make some changes to the texture within the code it seems that it changes back to point. Re setting it to bilinear after the changes are made fixed my issue.