General question - glsl

Hi everyone,

I have a simple understanding question regarding glsl!

Right now my Game uses different Gamestates (InGame, Menu and Intro)! Mostly all of my code is in the IngameState! For example water (withs quads), billboards (80), player, enemy (about 20), terrain, sky!

The frame rate is between 20 and 60!

Can I use glsl to put for example the water and billboard there, so that the frame rate gets higher?

What can I use glsl for?

Thanks :wink:

You might want to check first to see if you're even CPU bound, if you're GPU bound glsl shader coding won't help.  It seems like you're CPU bound, but it should be a first check.

You should look into locking if haven't already used it.

Some general tips for good performance in jME:

  • always use bounding volumes and set cull to dynamic
  • sort in queue
  • lock as much as possible
  • batch static geometry (maybe with texture atlases)
  • use shared meshes as often as possible
  • cull backfacing triangles
  • use LOD for highly detailed models

Thanks! I will take a look at all those possibilities !

GLSL/Shaders can be used to improve performance, but its not simply something you add and automagically your FPS triples. :wink:

GLSL is mainly used for visual effects, post processing, per-pixel lighting, bump mapping, etc. It is also a problem because using it makes your application incompatible with older GPUs.