I have a bunch of materials with my own little shader called “blended”. It is cpu intensive though, so I want to have an option to switch to the cheaper one “diffuse” on the fly.
Is this possible by script? To switch back and forth between the shaders on that material so that it will go faster.
Also, is it possible to change a texture from non-mipmap to mipmap on the fly? I’m guessing no since it’s an import feature so I would need to create 2 textures and switch among them on the fly (right? how to switch on script?)
thanks for the reply. I see the link but I see no sample code. If I want to change the shader to diffuse I just go shader=“difusse” ? since they are in the standard assets I don’t know how to reference it
I’d just keep two materials as variables and switch what the renderer uses when appropriate. As for the mipmaps, you can’t change the way the texture was imported, but you can completely get rid of any contribution of the mipmaps using this, which you can change in real-time.