Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Custom Shader Question  (Read 535 times)
serial
Customers
Community Member
*****
Posts: 299


« on: December 03, 2007, 03:35:42 PM »

This is kind of obvious but I thought I would ask anyways.

If I'm using a custom shader do I need to instantiate a shader for
every model that wants to use it?

Logged
newborn
Customers
Community Member
*****
Posts: 2437


WWW
« Reply #1 on: December 03, 2007, 05:53:07 PM »

one shader for multiple models, yes, its possible

edit: you do not need to instantiate your shader, just apply it to your model

edit 2: my 2000th post! whohoo!
« Last Edit: December 03, 2007, 06:18:49 PM by newborn » Logged

TecnoBacon
Customers
Community Member
*****
Posts: 235


WWW
« Reply #2 on: December 04, 2007, 01:38:54 PM »

Sugestion,

keep a shader array with the TV index assigned when you load it and the number of objects that are using it. this way you can easily share a shader as well as not removing it until all objects have stopped using it.

Eric, CEO TecnoBacon
Logged

www.TecnoBacon.com - the other side of the Bacon family! 3D Development, Music and more.
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks