29 if (cameraComponent && cameraComponent->camera() == camera) {
30 return cameraComponent;
38 if (!renderComponent) {
41 if (!cameraComponent) {
45 const auto& layers = renderComponent->layers();
50 return std::any_of(layers.begin(), layers.end(), [cameraComponent](
const int layerId) {
51 return cameraComponent->rendersLayer(layerId);
62 const auto* cameraComponent = findCameraComponentForCamera(camera);
63 return cameraRendersRenderComponent(cameraComponent, renderComponent);
68 if (!meshInstance || !meshInstance->
mesh()) {
80 if (material && material->
transparent() && !alphaTestCaster) {
88 if (meshInstance->
cull()) {
89 if (!shadowCamera || !shadowCamera->
node()) {
static const std::vector< CameraComponent * > & instances()
Perspective or orthographic camera with projection matrix, jitter (TAA), and render target binding.
const std::unique_ptr< GraphNode > & node() const
virtual bool enabled() const
Base class for GPU materials — owns uniform data, texture bindings, blend/depth state,...
AlphaMode alphaMode() const
std::shared_ptr< VertexBuffer > getVertexBuffer() const
Renderable instance of a Mesh with its own material, transform node, and optional GPU instancing.
Material * material() const
bool shouldRenderShadowMeshInstance(MeshInstance *meshInstance, Camera *shadowCamera)
bool shouldRenderShadowRenderComponent(const RenderComponent *renderComponent, const Camera *camera)
bool isVisibleInCameraFrustum(Camera *camera, GraphNode *cameraNode, const BoundingBox &bounds)