Hey everyone,
I was going through the list of material types in Irrlicht and it's far less than what I need, though I could use them individually combined with my own shaders.
So if say I want a color map normal map, specular map, opacity map, luminosity map all for one model, can I:
create an ISceneNode that renders a luminosity map with an IMesh and make it the child of an empty (no mesh) ISceneNode that has an opacity map shader as it's material, then make that a child of another ISceneNode so on... to combine all different shaders that I have? Or do I have to combine my shaders inside the programs?
( Do I have to have a shader that is like OpacityLuminosityNormalSpecularMap.VERT / FRAG ?)
Thanks
Layers of ISceneNode
So how would I go about giving the option to have all these maps or only some of those?
So in a custom material I wanna have a syntax like:
texture {
color "root/textures/bump/color.tga"
bump "root/textures/bump/bump.tga"
lum "root/textures/bump/lum.tga"
opacity "root/textures/bump/opacity.tga"
}
but it can also be like:
texture {
color "root/textures/bump/color.tga"
opacity "root/textures/bump/opacity.tga"
}
what would be the approach to separate those different layers yet combine them all in one shader?
So in a custom material I wanna have a syntax like:
texture {
color "root/textures/bump/color.tga"
bump "root/textures/bump/bump.tga"
lum "root/textures/bump/lum.tga"
opacity "root/textures/bump/opacity.tga"
}
but it can also be like:
texture {
color "root/textures/bump/color.tga"
opacity "root/textures/bump/opacity.tga"
}
what would be the approach to separate those different layers yet combine them all in one shader?
You could possibly try and use BlindSide's shader preprocessor:
http://irrlicht.sourceforge.net/phpBB2/ ... eprocessor
It generates shaders on the fly based on defines that you can do from your client program. Sorry if that explanations sucks, but go check it out.
http://irrlicht.sourceforge.net/phpBB2/ ... eprocessor
It generates shaders on the fly based on defines that you can do from your client program. Sorry if that explanations sucks, but go check it out.
TheQuestion = 2B || !2B
You need to put your textures in to different layers in your material. There is limit of 4 layers in Irrlicht currently but your hardware might limit you to two (or hardware of user of your software). Material will pass those textures in to driver. There it is up to you and your shader what will happen to them.