Closed ntrf closed 8 years ago
You wouldn't typically call Luxe.renderer.state
directly like that (since the camera has the option), the correct usage is to set the camera options like you mentioned. What do you mean reverse order?
Ok. It wasn't obvious to me that RenderState
should not be accessed like that becase it has properties, which can not be changed otherwise (like depth order).
I'm using one camera to render 3d models (depth test on, no back faces, z-write), particles (depth tested, no z-write, front and back faces) and attached ui elements (depth test and z-write off). So i have multiple batches refering to a single camera. For particle batch i have to set cull_backfaces = true
in prerender and cull_backfaces = false
in postrender. It feels like camera setup should not be changed from one batcher to another.
Yea the renderer is (as mentioned in many dev logs) changing to embers, while phoenix was designed pre-luxe, embers fits more of the approach luxe will take going to 1.0.
In function
Batcher::draw
prerender callback is executed beforeupdate_view
, which will eventually callCamera::process
and overwrite theCULL_FACE
setting done in prerender callback.As a result this code has no effect:
I had to add
Luxe.camera.view.cull_backfaces = false;
and reverse in order to make it work.