Closed mreinstein closed 9 years ago
Have you tried not setting the normal texture? Have you tried attaching a light to the object itself?
I tried disabling the normal texture yes. I also added a bloom filter to the object. I hadn't tried attaching a light to the object itself, which I'll do now.
There isn't a straight forward way in this lib to say "exclude this object from lighting effects". In fact, I'm not sure there is one at all.
I'm not sure there is a way in this lib to say "exclude this object from lighting effects".
yeah that's exactly what I'm after. That's too bad. Thanks for the heads up anyway.
By the way this prototype is effin cool! Great work so far. :)
I just thought of a workaround, figured I'd get your 2 cents; would it be feasible to declare a standard pixi renderer, use that for rendering just the self illuminated stuff, and draw it on top of the deferred render?
If you have a separate renderer then that is a separate canvas, IIRC. I'm not sure if that would work.
Likely this lib would have to have a post-render step that renders all the non-illuminated objects.
Ok, so I added an "unlit" render pass for after the scene is drawn. Any sprites without a normal texture assigned will act like an unlit sprite and be drawn on top of the lit scene.
I added an example of this in the index.html file. You can view it by cloning the repo, running npm i
, then npm start
. Let me know if this direction works for you.
I've tried it out, works great! This panda test object which is unlit by the lighting engine, will it accept shader(s)?
Sorry, I didn't read the source carefully enough; I see now that you're actually already applying a filter to the panda image. Great work!
What I'd like to do is take a sprite or graphics object, mark it as self illuminating and give it a bloom effect filter. The idea being that a light source visually represented in the scene wouldn't be affected by lights/normals. kind of like this: