I'm getting a strange issue with Graphics.DrawMeshNow(). As I change the camera angle, it seems as if it switches to another material from elsewhere in my scene, instead of using the material I am setting the pass of. My code is below:
What am I doing wrong (or not doing)?
Edit: A sample project that reproduces the issue can be downloaded here: Download
After some further investigation, it seems that the problem is caused by using the Diffuse shader in the material that DrawMeshNow() uses to draw the mesh. If the shader is changed to VertexLit, the mesh renders with the correct material. I suspect that this is related to DrawMeshNow() not using pixel lighting, although I'd be happy to be corrected by someone who knows better.
I am the poster of the original question. Due to a mess up involving trying to change my anonymous account to a registered one, I can no longer login with the account that I created the question with, so I can't approve a solution or edit the question or comments.
answered Nov 25 '09 at 03:21 PM