Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Wireframe respect visible entities (bevyengine#4660)
# Objective - Make meshes with a Wireframe component not render if they are not in the VisibleEntities list of a given camera - See [discussion](https://discord.com/channels/691052431525675048/742884593551802431/971392761972527144) on the Bevy Engine Discord - Fixes this kind of issues: ![image](https://user-images.githubusercontent.com/1733200/166746303-39003d57-8b07-4ae2-9ddf-bacdb04e7d84.png) Camera for the RenderTexture in the bottom left is set to only see layer 1 entities. The three colored lines are on the render layer 1, but not the sphere (which has a Wireframe component). ## Solution - Mimick what is done in [bevy_pbr/src/material.rs#L307](https://github.com/bevyengine/bevy/blob/479f43bbf34834ad2d4667de43351b6fa51f22d1/crates/bevy_pbr/src/material.rs#L307) for [bevy_pbr/src/wireframe.rs#L106](https://github.com/bevyengine/bevy/blob/2b6e67f4cb441f658cad17486eea9e3485e56709/crates/bevy_pbr/src/wireframe.rs#L106) - Credits to beep for finding this out!
- Loading branch information