Jump to content
  • Advertisement

Graphics Adding temporary materials to objects

Recommended Posts

Hello everyone, I tried to google for some info on this but had no luck (or didn't know where to look)

I'm writing some shaders that would be applied to items on top of their "regular" shader once in a while. Since some of them can be computationally expensive I'd rather use these materials only when they're needed. So my question is, how is this normally done in Unity? (or any other engine for that matter). Is it ok to dynamically add and remove materials to/from objects when they are needed? Or maybe you can write every shader as a "pass" and somehow activate/deactivate passes?

What if you have a scene with hundreds or thousands of items and want to apply the same material to all of them at once for a couple seconds?




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!