@@ -115,11 +115,10 @@ void Cluster::initialize(int _argc, char* _argv[])
115115 // Sponza
116116 // debug camera + lights
117117 scene->camera .lookAt ({ -7 .0f , 2 .0f , 0 .0f }, scene->center , glm::vec3 (0 .0f , 1 .0f , 0 .0f ));
118- scene->pointLights .lights = {
119- // pos, power
120- { { -5 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } },
121- { { 0 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } },
122- { { 5 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } }
118+ scene->pointLights .lights = { // pos, power
119+ { { -5 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } },
120+ { { 0 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } },
121+ { { 5 .0f , 0 .3f , 0 .0f }, { 100 .0f , 100 .0f , 100 .0f } }
123122 };
124123 scene->pointLights .update ();
125124 config->lights = scene->pointLights .lights .size ();
@@ -259,19 +258,19 @@ void Cluster::BgfxCallbacks::traceVargs(const char* filePath, uint16_t line, con
259258 if (written > 0 && written < BX_COUNTOF (buffer))
260259 {
261260 // bgfx sends lines with newlines, spdlog adds another
262- if (buffer[written- 1 ] == ' \n ' )
261+ if (buffer[written - 1 ] == ' \n ' )
263262 buffer[written - 1 ] = ' \0 ' ;
264263 Log->trace (buffer);
265264 }
266265}
267266
268267void Cluster::BgfxCallbacks::screenShot (const char * name,
269- uint32_t width,
270- uint32_t height,
271- uint32_t pitch,
272- const void * data,
273- uint32_t /* size*/ ,
274- bool yflip)
268+ uint32_t width,
269+ uint32_t height,
270+ uint32_t pitch,
271+ const void * data,
272+ uint32_t /* size*/ ,
273+ bool yflip)
275274{
276275 // save screen shot as PNG
277276 char filePath[1024 ];
@@ -410,10 +409,7 @@ void Cluster::generateLights(unsigned int count)
410409 position.y = glm::abs (position.y ); // Sponza
411410 glm::vec3 color = glm::vec3 (dist (mt), dist (mt), dist (mt));
412411 glm::vec3 power = color * (dist (mt) * (POWER_MAX - POWER_MIN) + POWER_MIN);
413- lights[i] = {
414- position,
415- power
416- };
412+ lights[i] = { position, power };
417413 }
418414
419415 scene->pointLights .update ();
0 commit comments