#include "noise.h"
#include "constants.h"
#include "debug.h"
+#include "main.h" // For g_profiler and g_settings
+#include "profiler.h"
+#include "settings.h"
Clouds::Clouds(
scene::ISceneNode* parent,
if(SceneManager->getSceneNodeRenderPass() != scene::ESNRP_SOLID)
return;
+ ScopeProfiler sp(g_profiler, "Rendering of clouds, avg", SPT_AVG);
+
+ int num_faces_to_draw = 1;
+ if(g_settings->getBool("enable_3d_clouds"))
+ num_faces_to_draw = 6;
+
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
driver->setMaterial(m_material);
f32 ry = 8*BS;
f32 rz = cloud_size;
- for(int i=0;i<6;i++)
+ for(int i=0; i<num_faces_to_draw; i++)
{
switch(i)
{