I’m working with the new feature from Unity 5.1, Command Buffers & Draw Procedural. The latter command called by the Graphics library does not allow integration with the deferred lighting pipeline. So I wanted to set up a command buffer that put the mesh into the middle of the rendering process, and thus let it still react to lighting.
However, it doesn’t work - I’m getting some odd bugs. If I set the camera event to before lighting, the color of the object gets reset (when I had ambient intensity to max, it was set to the skybox color… when I turned it to 0, it reset to just white), ignoring the texture calls. However, the alpha test clipping still occurs, just the returned color value is incorrect.
If I set it to other points in the rendering process, the lighting doesn’t happen at all, I can’t get shadows to hit the geometry, nor can I get the geometry to actually be lit.
Here’s a test project for this…
https://www.dropbox.com/s/7r56c8odwetz5yk/CmdBufferDrawProcedural.zip?dl=0
(mirrored on dropbox as it didn’t seem to be uploading… guess it did though!)
Wanted to first check to make sure I wasn’t missing any intended functionality before reporting it as a bug!