Sign in to follow this  
riuthamus

DX11 and multiple shader Textures

Recommended Posts

So I have been going through other games recently to see how they allow people to modify their elements and one that struck me as odd was Dota2. In their "mod" tools documentation they have setup a process for two mask textures to be applied, each of those textures have an RGBA setup and each channel is used for a different shader reference. This seems interesting as I thought that this type of process would bog down the draw calls and make the system more memory intensive.

 

What are your thoughts on this, and is there a better method to implementing more than 3 shaders? Currently we use a diffuse texture and the rest of the shaders are associated with the specular texture. Thanks for any advice you can provide in advance.

 

Reference Link:

http://media.steampowered.com/apps/dota2/workshop/Dota2ShaderMaskGuide.pdf

Edited by riuthamus

Share this post


Link to post
Share on other sites

ah that's cool it looks like they have a lot of flexibility with all those masks.  i think you may misunderstand though.  each of those channels doesn't mean they are using different shaders for different parts of the character.  the character could be rendered with one draw call and a shader which computes all 8 material properties and uses the 8 masks to control those properties.  so using the same shader and different weights in those mask channels you can achieve very different looking materials on the different parts of the character.  hope this helps

Edited by blackpawn

Share this post


Link to post
Share on other sites

ah that's cool it looks like they have a lot of flexibility with all those masks.  i think you may misunderstand though.  each of those channels doesn't mean they are using different shaders for different parts of the character.  the character could be rendered with one draw call and a shader which computes all 8 material properties and uses the 8 masks to control those properties.  so using the same shader and different weights in those mask channels you can achieve very different looking materials on the different parts of the character.  hope this helps

 

pretty much.

 

depending on how they do the shader, it may be possible to feed in a bunch of various maps as textures, and then enable/disable features or use defaults for maps which aren't present.

 

something like a "generic material lighting shader" may still end up with a lot of inputs, while still being a single shader.

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

Sign in to follow this