well we have some cars here and the primary material for their body is Diffuse+Normal+Specular+ some Gloss changes..
however it's not look like carpaint shader, but we are ok with that as we can't do anything else!
our biggest problem is glasses.
as far as I tested about this, we have 2 kind of transparency into engine. one of them uses only 0-1 in alpha channel of diffuse textures (mesh_diffuse_blabla_alphatest)in this case there is no problems during rendering or casting shadows or anything else.. but as this type is only for 0-1, so it should not use for glass like materials.
another kind of transparency is to use blend=alpha without using mesh_diffuse_blabla_alphatest in shader.
but this kind of transparency sucks when you want to use is as something like glass. it won't render terrain, some of models, shadows... (or maybe I can not use it correct)
this:
texture0="abstract::glasstest.dds"
clamp0=0,0,0
texture1="abstract::glasstest_nrm.dds"
clamp1=0,0,0
blend=alpha
depthmask=1
depthtest=1
overlay=0
zsort=0
cullface=0
castshadows=1
specular=2.50000000
bumpscale=0.300000012
gloss=0.250000000
shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular_alphatest.frag"
shadowshader="abstract::mesh_shadow.vert","abstract::mesh_shadow.frag"
looks like this (only 0,1):
and this:
texture0="abstract::glasstest.dds"
clamp0=0,0,0
texture1="abstract::glasstest_nrm.dds"
clamp1=0,0,0
blend=1
depthmask=1
depthtest=1
overlay=0
zsort=0
cullface=0
castshadows=1
specular=2.50000000
bumpscale=0.300000012
gloss=0.250000000
shader="abstract::mesh_diffuse_bumpmap.vert","abstract::mesh_diffuse_bumpmap_specular_alphatest.frag"
shadowshader="abstract::mesh_shadow.vert","abstract::mesh_shadow.frag"
looks like this:
(but WHY?? )
This is my diffuse texture
and
This is my normal texture
and I can not use these for glasslike models.
but as I can see emitters are using transparent dust, I'm looking for something like that in normal shaders to use them as car glass shader which needs cullface for car inside too..
and alphatest results on car, looks like this:
and I'm too tired to make blend=alpha again! but it was worse than it's 2d plane!
finally any kind of tips or suggestions to improve car shaders would be helpfull here.