- Home /
Is there a delay when setting properties on a material.
Here is my setup. I have a quad attached to the front of my main camera that I use for doing some "pre-processing" on the camera render. Specifically I'm using a clipping plane to change the stencil buffer and skybox of one half of the screen.
I want to teleport the camera, and to do this seamlessly at the same time I also use Material.SetMatrix and other property setters to update the information on quad's material. However, I'm still seeing a flickering when I teleport. I've recorded video clips and stepped through them to get a good look at the flickering frames, and it looks like one or more of the updates the material's properties are not taking effect until the next frame.
Nothing in the documentation mentions a delayed effect when changing material properties from script. Does anyone know if this is the case or not?
There's no such thing like a delay, but i recommend you to put your "teleport logic" in the LateUpdate Loop, in this loop is where all the camera movement should be.
Hope it helps.
Your answer
Follow this Question
Related Questions
How do I do custom camera render between opaque and transparent objects? 0 Answers
Render inside of mesh as black 2 Answers
Rendering different shader when camera get near object 1 Answer
How to get depth texture and render texture from one camera 0 Answers
different material for multi camera 1 Answer