Home Technical Talk

Double-Sided Shader or Model Backfaces

polycounter lvl 15
Offline / Send Message
Noth polycounter lvl 15
I'll give some context -- Working on a mobile game, modelling some teeth for a dinosaur. We'll see the through the mouth and see the back-sides of the teeth. I'm thinking I'll use a double-sided shader, but I could also model the back-sides more simply than the front.

Could anyone give me some direction on the best course of action, and maybe your considerations for the decision? Thanks!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I would say these days it wouldn't matter because a 2 sided shader is cheap and an extra 100 polygons won't change anything either. So then I'd go with the shader.
  • Noth
    Options
    Offline / Send Message
    Noth polycounter lvl 15
    Excellent, thanks.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Im not a render pipeline expert but a double sided material is certainly more costly than duplicating a bunch of tris. It will be applied to all model, causing more overdraw, shader will have more instructions...I dont see the point to use it in your case especially on mobile.
  • gvii
    Options
    Offline / Send Message
    gvii polycounter lvl 10
    I think its better to have a double sided shader for specific things and everything else culled, but with that said, I tend to do a duplicate and inflate/z translate to create backfaces since I can do darker shading for hand painted stuff, which takes advantage of the situation to make it look better. With the case of teeth though, making it paper thin will end up looking strange, so its better to do modelling with thickness. You can do mesh for most teeth and insert fangs and such over the regular mesh to break up the shape.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    It all depends on the renderer and the wider context it's used in. 

    Adding draw calls is probably more costly than a couple of hundred tris so adding material and breaking any batching that might be going on probably isn't the best idea.  If you have a render programmer, ask them.   if not I'd suggest you just go with geometry and LOD it sensibly.


Sign In or Register to comment.