opengl - Lighting 2D Objects from behind -
i working on 2.5d lighting problem. wanted create effect moon lighting 2d things behind. have ever seen solution problem this? i'm trying use normal maps on sprite in unity, looks fine-ish when moon poking out behind -- when it's behind (as in third picture), effect doesn't work -- because light 2d element in 3d, have light front, far know perhaps there's solution doesn't involve real light, shaders reveal angle-based mask. have bright (haw!) ideas?
i'm not familiar using 2d objects i'm guess going have simulate effect using transparency , looking function calculate brightness origin (the center of moon) or (not sure if possible) maybe create 3d overlay (or backlay if will) uses material give desired look.....set transparency on 2d object allow light effects of 3d rectangle shine though..
there beter solutions, i'm throwing ideas around
Comments
Post a Comment