@@ -252,7 +252,7 @@ void RenderImGui()
252252 for (int i = 0 ; i < scene->materials .size (); i++) {
253253 materialKey[i] = materialIdx[i].c_str ();
254254 }
255- if (ImGui::Combo (" Combo " , ¤tItem, materialKey, materialIdx.size ())) {
255+ if (ImGui::Combo (" Scene Materials " , ¤tItem, materialKey, materialIdx.size ())) {
256256 mat = &scene->materials [currentItem];
257257 }
258258 // create label: slider value GUI
@@ -261,62 +261,62 @@ void RenderImGui()
261261 bool update = false ;
262262 ImGui::Text (" Material ID: %d" , mat->materialId );
263263 // color
264- ImGui::Text (" Color: (%f, %f, %f) " , mat-> color . x , mat-> color . y , mat-> color . z );
264+ ImGui::Text (" Color: " );
265265 ImGui::SameLine ();
266266 if (ImGui::ColorEdit3 (" ##color" , (float *)&mat->color )) update = true ;
267267
268268 // metallic
269- ImGui::Text (" Metallic: %f " , mat->metallic );
269+ ImGui::Text (" Metallic: %.2f " , mat->metallic );
270270 ImGui::SameLine ();
271271 if (ImGui::SliderFloat (" ##metallic" , &mat->metallic , 0 .0f , 1 .0f )) update = true ;
272272
273273 // subsurface
274- ImGui::Text (" Subsurface: %f " , mat->subsurface );
274+ ImGui::Text (" Subsurface: %.2f " , mat->subsurface );
275275 ImGui::SameLine ();
276276 if (ImGui::SliderFloat (" ##subsurface" , &mat->subsurface , 0 .0f , 1 .0f )) update = true ;
277277
278278 // specular
279- ImGui::Text (" Specular: %f " , mat->specular );
279+ ImGui::Text (" Specular: %.2f " , mat->specular );
280280 ImGui::SameLine ();
281281 if (ImGui::SliderFloat (" ##specular" , &mat->specular , 0 .0f , 1 .0f )) update = true ;
282282
283283 // roughness
284- ImGui::Text (" Roughness: %f " , mat->roughness );
284+ ImGui::Text (" Roughness: %.2f " , mat->roughness );
285285 ImGui::SameLine ();
286286 if (ImGui::SliderFloat (" ##roughness" , &mat->roughness , 0 .0f , 1 .0f )) update = true ;
287287
288288 // specularTint
289- ImGui::Text (" Specular Tint: %f " , mat->specularTint );
289+ ImGui::Text (" Specular Tint: %.2f " , mat->specularTint );
290290 ImGui::SameLine ();
291291 if (ImGui::SliderFloat (" ##specularTint" , &mat->specularTint , 0 .0f , 1 .0f )) update = true ;
292292
293293 // anisotropic
294- ImGui::Text (" Anisotropic: %f " , mat->anisotropic );
294+ ImGui::Text (" Anisotropic: %.2f " , mat->anisotropic );
295295 ImGui::SameLine ();
296296 if (ImGui::SliderFloat (" ##anisotropic" , &mat->anisotropic , 0 .0f , 1 .0f )) update = true ;
297297
298298 // sheen
299- ImGui::Text (" Sheen: %f " , mat->sheen );
299+ ImGui::Text (" Sheen: %.2f " , mat->sheen );
300300 ImGui::SameLine ();
301301 if (ImGui::SliderFloat (" ##sheen" , &mat->sheen , 0 .0f , 1 .0f )) update = true ;
302302
303303 // sheenTint
304- ImGui::Text (" Sheen Tint: %f " , mat->sheenTint );
304+ ImGui::Text (" Sheen Tint: %.2f " , mat->sheenTint );
305305 ImGui::SameLine ();
306306 if (ImGui::SliderFloat (" ##sheenTint" , &mat->sheenTint , 0 .0f , 1 .0f )) update = true ;
307307
308308 // clearcoat
309- ImGui::Text (" Clearcoat: %f " , mat->clearcoat );
309+ ImGui::Text (" Clearcoat: %.2f " , mat->clearcoat );
310310 ImGui::SameLine ();
311311 if (ImGui::SliderFloat (" ##clearcoat" , &mat->clearcoat , 0 .0f , 1 .0f )) update = true ;
312312
313313 // clearcoatGloss
314- ImGui::Text (" Clearcoat Gloss: %f " , mat->clearcoatGloss );
314+ ImGui::Text (" Clearcoat Gloss: %.2f " , mat->clearcoatGloss );
315315 ImGui::SameLine ();
316316 if (ImGui::SliderFloat (" ##clearcoatGloss" , &mat->clearcoatGloss , 0 .0f , 1 .0f )) update = true ;
317317
318318 // ior
319- ImGui::Text (" IOR: %f " , mat->ior );
319+ ImGui::Text (" IOR: %.2f " , mat->ior );
320320 ImGui::SameLine ();
321321 if (ImGui::SliderFloat (" ##ior" , &mat->ior , 0 .0f , 1 .0f )) update = true ;
322322
0 commit comments