SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GetPointLight()

void Spices::Renderer::GetPointLight ( FrameInfo & frameInfo,
std::array< SpicesShader::PointLight, SpicesShader::POINTLIGHT_BUFFER_MAXNUM > & pLightBuffer )
protectedinherited

Get PointLightComponent's render data in World.

Parameters
[in]frameInfoThe current frame data.
[out]pLightBufferPointLight Buffer.
Todo
infinity pointlight.

Iter PointLightComponent.

End of PointLightBuffer.

Iter PointLightComponent.

End of PointLightBuffer.

Definition at line 445 of file Renderer.cpp.

446 {
448
452 int index = 0;
453 IterWorldCompWithBreak<PointLightComponent>(
454 frameInfo,
455 [&](
456 int entityId,
457 TransformComponent& tranComp,
458 PointLightComponent& plightComp
459 ) {
460
461 SpicesShader::PointLight pointLight = plightComp.GetLight();
462 pointLight.position = tranComp.GetPosition();
463 pLightBuffer[index] = pointLight;
464 index++;
465 return false;
466 });
467
471 pLightBuffer[index].intensity = -1000.0f;
472 }
#define SPICES_PROFILE_ZONE

References Spices::PointLightComponent::GetLight().

Referenced by Spices::RayTracingRenderer::Render(), and Spices::SceneComposeRenderer::Render().