31 uint8_t lightIndex = 0;
32 const glm::mat4 rotateLight = rotate(glm::mat4(1.F), frameTime, {0.F, -1.F, 0.F});
34 for (
Object&
object : m_objects | std::views::values) {
37 .normalMatrix =
object.transform.normalMatrix()
39 m_uboBuffers.at(frameIndex)->writeToIndex(&data,
object.getId());
40 object.setBufferInfo(
static_cast<int>(frameIndex), m_uboBuffers.at(frameIndex)->descriptorInfoForIndex(
object.getId()));
43 for (
Light &light : m_lights | std::views::values) {
44 auto&[position, color, shininess, padding] = ubo.
pointLights.at(lightIndex);
45 light.transform.translation = glm::vec3(rotateLight * glm::vec4(light.transform.translation, light.transform.scale.x));
46 position = glm::vec4(light.transform.translation, light.transform.scale.x);
48 shininess = light.getShininess();
This file contains the Texture Factory class.
static std::unique_ptr< Texture > create(Device &device, const std::string &filepath)