Material & Custom Material
by elvince · in Torque 3D Professional · 01/13/2010 (3:25 am) · 2 replies
Hi,
I'm trying to understand the difference between Material & Custom Material.
From what I read, the custom material is used to apply a shader to a material and link it to your mesh with map_to.
Does that mean we can't apply a shader on a material? I mean that the "basic" material have a lot of thing like bump, specular & so, and if I want to apply a shader on a diffuse map and keep the bump, specular I will have to code them in my shader? did I miss something?
If there any quick material copy function, that we can call during game processing?
I'm trying to understand the difference between Material & Custom Material.
From what I read, the custom material is used to apply a shader to a material and link it to your mesh with map_to.
Does that mean we can't apply a shader on a material? I mean that the "basic" material have a lot of thing like bump, specular & so, and if I want to apply a shader on a diffuse map and keep the bump, specular I will have to code them in my shader? did I miss something?
If there any quick material copy function, that we can call during game processing?
About the author
Recent Threads
#2
materials will use shaders according to what parameters are set. so if you provide a bump map, engine will know to create a shader which uses it.
you would need to create your own .hlsl file for a custom material.
04/17/2010 (11:46 pm)
Quote:
Does that mean we can't apply a shader on a material?
materials will use shaders according to what parameters are set. so if you provide a bump map, engine will know to create a shader which uses it.
you would need to create your own .hlsl file for a custom material.
Torque 3D Owner Ian Wilson
Anchor Gate
unfortunately, as far as I know shaders are global to the material (anyone correct me if I'm wrong) so in any ONE material, any texture calls made will have the shader effect applied to it. you can use multiple materials on a single object however, and get around that system in that way.