About Store Forum Documentation Contact



Post Reply 
[Android] FogDraw fog is invisible
Author Message
Mardok Offline
Member

Post: #1
[Android] FogDraw fog is invisible
Hi guys,

I cant see fog on my mobile devices: Sony Xperia Z1 Compact (Adreno 330), ASUS TF300TG (Tegra3)

I need simple static fog on bottom of my level. On desktop all is looking nice but on mobile fog is invisible.

This sample code renders red cube filled with fog, on PC all is ok but on mobile fog is invisible.

Code:
void InitPre()
{
   EE_INIT();
   Ms.hide();
   Ms.clip(null, 1);
   D.ambientPower(0.1);
  
   Renderer.type(RT_SIMPLE);
}

bool Init()
{
   Cam.at.set(0, -1, 0);
   Cam.pitch=-0.5;
   Cam.dist =15;

   return true;
}

void Shut(){}

bool Update()
{
   if(Kb.bp(KB_ESC) || Kb.bp(KB_NAV_BACK))return false;
   Cam.transformByMouse(0.1, 1000, CAMH_ZOOM|(Ms.b(1)?CAMH_MOVE:CAMH_ROT));

   return true;
}

void Render()
{
   switch(Renderer())
   {
      case RM_BLEND: // local fog needs to be drawn in RM_BLEND mode
      {
         FogDraw(OBox(Box(10, 10, 10, Vec(0, 0, 0))), 0.6, Vec(1.0, 0.0, 0.0));
      }break;
   }
}

void Draw()
{
   Renderer(Render);
  
   D.text(0, 0.9, S+"Fps: "+Time.fps());
   D.text(0, 0.8, S+"Press ESC or BACK to EXIT");
}
06-19-2017 09:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: [Android] FogDraw fog is invisible
Hi,

That feature is unavailable on mobile devices.

The only fog available on Mobile is Renderer.simpleVertexFog*

and Sky.frac(0)
06-20-2017 06:20 AM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #3
RE: [Android] FogDraw fog is invisible
ok, ty

That type of fog is unavailable on mobile because mobiles GPU are too slow or there are other compatibility issues? or You haven't time to implement this into engine?
06-20-2017 07:30 AM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #4
RE: [Android] FogDraw fog is invisible
Ty aceio76 for reply.
Hmm yea, particles could be fine to simulate fog in some places but i need different type of fog.

I wanted to achieve fog on bottom of my level.
[Image: fog.png]

When i added fog first time i loved this. Whole game looks better, levels are climatic and mysterious.
Maybe i try with water xD I never touched water on mobile, i'll try today. If water works on mobile then it should work.
06-20-2017 06:08 PM
Find all posts by this user Quote this message in a reply
Post Reply