@StainlessTobii wrote:
I thought we should put together a thread with things that aren't obvious that have caught us out in the past.
A thread you can read through when nothing makes sense and your code won't do what you tell it to do.
My contribution...
ContentManager Automatic Caching
When you load a shader through the content manager, you do not get a new instance of the shader.
If you load the same shader multiple times, there is only one instance of that shader.So this pseudo code will not wok
` Foreach mesh part Load the shader Setup uniforms for this mesh part End loop
`
What happens in this case is all the mesh parts will be rendered with the same uniforms, the last set you set.
If you want to use this technique, you have to clone the effect
Thread open to anyone, please add your own GOTCHA's
Posts: 1
Participants: 1