- Home /
How and why: Command buffers?
I'm trying to learn how to use U5's new command buffers and find out what I can do with them. I've got the example project open and I'm not really getting just how they're doing what they do or why they're set up the way they are. I don't have any specific use in mind since I don't fully understand exactly what I'm dealing with here.
For instance, all the examples in this project toss creating the buffer and all of its commands into OnWillRenderObject (). and while the Readme says we should only recreate the buffer when something has changed, that still doesn't explain why the whole thing has to be in that method.
-If the buffer gets inserted into the camera at a specific event in the rendering, why can it not just be inserted once?
-Why must it happen only when this object is rendered? Why does the behavior change when I place it in Update ()?
-What happens if this object is supposed to render at a point after the event in which we insert the buffer? (ex: transparent object with a script trying to add a CB before/after G-buffer?)
I'm not a shader programmer so maybe I'm just missing something here. I've never worked with camera effects or anything involving render targets except for basic usage of cameras with render textures. The documentation lacks any other examples or code as much of the newer documentation is. Any help understanding these things and getting started with them is appreciated!
Your answer
Follow this Question
Related Questions
RenderTexture.Create failed: format unsupported 0 Answers
PDF Reader for android 1 Answer
Terrain Remains Pink After Installing LightWeight RenderPipepline 0 Answers
URP how to change RenderFeatures properties/settings at runtime 3 Answers
Is it possible to pass scene color to Sample Texture 2D LOD (URP, Shader Graph)? 0 Answers