jPCT-AE - a 3d engine for Android > Support

Does the fog affect the performance heavily?

(1/2) > >>

kiffa:
In my racing game, if i disable fogging, FPS = 50 - 54,  if i enable, FPS = 38 - 44. I don't know if i use it in a wrong way. Codes:


--- Code: --- world.setFogging(World.FOGGING_ENABLED);
 world.setFogParameters(3000, 3500, 155, 155, 155);
--- End code ---

EgonOlsen:
Which OpenGL mode are you using (1.x or 2.0)?

kiffa:
2.0

04-08 14:34:15.520: D/Woo3d(26573): GL vendor:NVIDIA Corporation
04-08 14:34:15.520: D/Woo3d(26573): GL version:OpenGL ES 2.0
04-08 14:34:15.530: D/Woo3d(26573): GL renderer:NVIDIA Tegra
04-08 14:34:15.530: D/Woo3d(26573): GLSL version:OpenGL ES GLSL 1.00

EgonOlsen:
Fog in OpenGL ES 2.0 is slower than in 1.1 because it has to be done in the fragment shader. Depending on the device that you are using, the performance impact might be normal. However, the set of default shaders is limited and not all of them support fog. So it might happen that you get an optimized shader without fog, but a more generic (=slower) one with fog. Can you tell me how many texture layers and lights affect the fogged objects?

kiffa:

--- Quote from: EgonOlsen on April 08, 2013, 10:17:55 am ---Can you tell me how many texture layers and lights affect the fogged objects?

--- End quote ---

Only one texture layer, and only ambientLight.

Navigation

[0] Message Index

[#] Next page

Go to full version