- Home /
Setting up lighting in command buffers
Hi all,
I want to render a mesh using a command buffer and forward lighting.
Using buffer.DrawMesh just uses the last light that was rendered, so I guess I have to set the shader variables myself before this.
Apparently, there aren't any helpers to setup a light, and there are a few shader globals to be set for a light to work (_LightColor0, etc).
Is there some documentation on how to do this properly? I bet many people found this problem before, but I couldn't find any solution.
Thanks in advance!
Answer by eddielu · Aug 28, 2019 at 07:42 AM
yep, same problem here, I found out _LightColor0 inconsistent.
Your answer
Follow this Question
Related Questions
How do you use the "state" with a Rendering CommandBuffer? 0 Answers
How to correctly render an object with a CommandBuffer? 0 Answers
How to properly draw a mesh using CommandBuffer.DrawMesh? 2 Answers
Using CommandBuffer how to draw Directional Light shadows in native plugin? 0 Answers
Graphics Command Buffers don't work with my project 0 Answers