Clarify that a Camera without RenderLayers only renders RenderLayers::layer(0) #18874
Labels
A-Rendering
Drawing game state to the screen
C-Docs
An addition or correction to our documentation
D-Trivial
Nice and easy! A great choice to get started with Bevy
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
How can Bevy's documentation be improved?
The documentation of
RenderLayers
inbevy/crates/bevy_render/src/view/visibility/render_layers.rs
Lines 10 to 21 in 18e1bf1
This lead me to assume that a camera without this component renders entities without regard to the layer they belong to. This does not work as a camera without
RenderLayers
only renders entities belonging toRenderLayers::layer(0)
.This can be seen in
bevy/crates/bevy_render/src/view/visibility/mod.rs
Line 533 in 18e1bf1
RenderLayers
is replaced with the default.While it could be argued that the line
/// Entities without this component belong to layer `0`.
also applies to the camera this was not clear to me.
I propose expanding the camera related section of the docs to something like this:
A further improvement would be to describe how to create a camera that renders all layers (if that is even possible).
I currently create a
RenderLayers
component containing all layers I use.This feels like a workaround and is error prone because I have to remember to add new layers.
The text was updated successfully, but these errors were encountered: