Home › Forums › Programming › Multiple shaders on single objects
- This topic has 7 replies, 5 voices, and was last updated 18 years, 5 months ago by Anonymous.
-
AuthorPosts
-
-
26/11/2005 at 2:09 pm #4826AnonymousInactive
Hi good people!
Im sitting here and writing on my game engine, and now I want to
do my shadermanager part of the engine more efficient and more advanced. 8)My intention was to have a shadermanager that allows to have multiple
shaders on every object from a list. (shadows and such).Now to my problem. Is there a “right” way to do this?
Every shader needs different inparameters to different objects and so on.
Is there a way to make this, or any good page with information about this?So far, Im only using one shader, and it feels to pathetic to fill one shader with all kinds of PS, so that is not really an option. :roll:
-
26/11/2005 at 10:54 pm #27711AnonymousInactive
i would say theres no right or wrong way. try to gather all your types of shaders your going to have as well as a list of what objects will use which then try to write as generic a manager which works for all these. then if you need additional functionality just extend this manager.
dunno if that helps. just the way i would do it. -
28/11/2005 at 11:41 am #27738AnonymousInactive
That is a good idea, having specific functions for different shaders.
But the main thought was, that I want to have a dynamic manager.
So if I add a new shader, I dont have to add another function to my lib.
Dont know if that is possible, unless I add the function in the game logic,
instead of the lib. :?In the meantime, I will take your advice, and make specific functions :)
-
28/11/2005 at 11:45 am #27739AnonymousInactive
How about adding a scripting language as well, like python or lua to enable the addition of extraneous functions without having to go back into the core code.
-
28/11/2005 at 11:52 am #27740AnonymousInactive
How about adding a scripting language as well, like python or lua to enable the addition of extraneous functions without having to go back into the core code.[/quote:e080830801]
thats actually a good idea. probably a good way to go.
-
12/12/2005 at 4:02 pm #28264AnonymousInactive
For ease of asset creation, you could try pinning the shader values to virtual textures, which could be applied to the object using a stand-in bitmap in the modelling programme.
The UVW coordinates of the virtual textures then define what part of the object is to be shaded.
I’m not exactly au-fait with shaders, so please don’t berate me if I’m spouting gibberish.
-
20/12/2005 at 10:54 am #28474AnonymousInactive
How about adding a scripting language as well, like python or lua to enable the addition of extraneous functions without having to go back into the core code.[/quote:8b2ca6aa5e]
That would be the best way to go, but I think it is a little bit too much for me to develop right now. But still a good idea.
For ease of asset creation, you could try pinning the shader values to virtual textures, which could be applied to the object using a stand-in bitmap in the modelling programme.
The UVW coordinates of the virtual textures then define what part of the object is to be shaded. [/quote:8b2ca6aa5e]Hmm.. Interesting, that could work for using multiple shaders.
Im going to try that one as soon as I am done with the animationsystem :)But how do I practically run several shaders on a single object, is it just as simple as adding a additional iPass in the shader render function?
-
14/04/2006 at 9:03 am #30943AnonymousInactive
you could check out how Valve did it on Source? They had this _huge_ Powerpoint presentation about their shader technology.
It’s a PDF file called D3DTutorial10 half life 2 shading, dating from 22nd of March 2004. Very interesting, even for me who is only a beginner with shaders.
Hope this helps
-
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.