Welcome, Guest.
Username: Password: Remember me

TOPIC: Why are some effects super slow in OpenGL?

Why are some effects super slow in OpenGL? 1 year 9 months ago #1

Hey, so I noticed that a few effects in the framework are super slow in OpenGL games. Notably Raymarching AO and HBAO. I was trying to use HBAO in Star Wars Jedi Knight: Jedi Academy. I knocks the frame rate down to unplayable no matter what quality you put it at. Same with RMAO. SSAO works fine.


Witanlore: Dreamtime
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #2

  • Kleio420
  • Kleio420's Avatar
  • Offline
  • Posts: 223
  • Thank you received: 28
vfxninjaeditor wrote:
Hey, so I noticed that a few effects in the framework are super slow in OpenGL games. Notably Raymarching AO and HBAO. I was trying to use HBAO in Star Wars Jedi Knight: Jedi Academy. I knocks the frame rate down to unplayable no matter what quality you put it at. Same with RMAO. SSAO works fine.

i tried doing this with the kotor games as well but ended up giving up on it , imo these older star wars games just need a new graphics overhaul to completely redo how rendering is done if we had one of those "enb" styled for the older starwars games we could really get modding going on these older games which actually have decent sized communities for them, with people who know how the games work if your interested i can give a link to a active site for at least the kotor games
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #3

  • robgrab
  • robgrab's Avatar
  • Offline
  • Posts: 123
  • Thank you received: 21
vfxninjaeditor wrote:
Hey, so I noticed that a few effects in the framework are super slow in OpenGL games. Notably Raymarching AO and HBAO. I was trying to use HBAO in Star Wars Jedi Knight: Jedi Academy. I knocks the frame rate down to unplayable no matter what quality you put it at. Same with RMAO. SSAO works fine.

It's been that way for a while now. I mainly notice it in the Star Wars games because the older ones use OpenGL. DoF and AO can drop framerates into the single digits in those games. Newer versions of MER have made huge strides in performance but I hope they (Marty) continue to optimize because it improves the visual quality so dramatically. I was messing with Jedi Academy and Jedi Outcast last night and they look awesome with Bloom, DoF, and AO.
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #4

robgrab wrote:
vfxninjaeditor wrote:
Hey, so I noticed that a few effects in the framework are super slow in OpenGL games. Notably Raymarching AO and HBAO. I was trying to use HBAO in Star Wars Jedi Knight: Jedi Academy. I knocks the frame rate down to unplayable no matter what quality you put it at. Same with RMAO. SSAO works fine.

It's been that way for a while now. I mainly notice it in the Star Wars games because the older ones use OpenGL. DoF and AO can drop framerates into the single digits in those games. Newer versions of MER have made huge strides in performance but I hope they (Marty) continue to optimize because it improves the visual quality so dramatically. I was messing with Jedi Academy and Jedi Outcast last night and they look awesome with Bloom, DoF, and AO.

Jedi Outcast is a classic, still on my shelf from 2002 when i bought it!
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #5

  • robgrab
  • robgrab's Avatar
  • Offline
  • Posts: 123
  • Thank you received: 21
Here's my WIP for Jedi Outcast. Using SSAO and Matso DoF has no performance impact!
Last Edit: 1 year 9 months ago by robgrab.
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #6

Aye, SSAO and all depth of field methods have no impact on performance. I have only noticed it with raymarching AO and HBAO. The SSGI AO doesn't even work correctly in opengl for some reason (renders all black).

If any of the shader developers see this, any particular reason this happens? I would love to have HBAO working in Jedi Academy.

Robgrab, what settings are you using for you SSAO?


Witanlore: Dreamtime
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #7

  • robgrab
  • robgrab's Avatar
  • Offline
  • Posts: 123
  • Thank you received: 21
vfxninjaeditor wrote:
Aye, SSAO and all depth of field methods have no impact on performance. I have only noticed it with raymarching AO and HBAO. The SSGI AO doesn't even work correctly in opengl for some reason (renders all black).

If any of the shader developers see this, any particular reason this happens? I would love to have HBAO working in Jedi Academy.

Robgrab, what settings are you using for you SSAO?
//AMBIENT OCCLUSION - GLOBAL PARAMETERS
#define AO_METHOD			1	//[1 to 2] 1: SSAO | 2: Raymarch AO | 3: HBAO | 4: SSGI
#define AO_SHARPNESS			0.5	//[0.05 to 2.0] 1: AO sharpness, higher means more sharp geometry edges but noisier AO, less means smoother AO but blurry in the distance.
#define AO_DEBUG			0	//[0 to 2] Enables raw debug output. 1: occlusion | 2: color bouncing (SSGI only!)
#define AO_LUMINANCE_CONSIDERATION	1	//[0 or 1] Enables dampening of AO intensity on bright pixels, to preserve bright light sprites or beter lit areas. Not for GI!
#define AO_LUMINANCE_LOWER		0.3	//[0.0 to 1.0] Lower brightness threshold where AO starts to fade out. Below this threshold AO has full power.
#define AO_LUMINANCE_UPPER		0.6	//[0.0 to 1.0] Upper brightness threshold where AO starts to fade out. Above this threshold AO is 0.

//AMBIENT OCCLUSION - SSAO
#define iSSAOSamples   			16	//[32 to 128] Amount of samples. Don't set too high or shader compilation time goes through the roof.
#define fSSAOSamplingRange		50.0	//[10.0 to 50.0] SSAO sampling range. High range values might need more samples so raise both.
#define fSSAODarkeningAmount 		0.65	//[0.0 to 5.0] Amount of SSAO corner darkening
#define fSSAOBrighteningAmount  	0.25	//[0.0 to 5.0] Amount of SSAO edge brightening

Also, SSGI absolutely works. You just need to mess with the settings. The default values will give you a black screen. I tried it but I preferred the look/performance of SSAO.
The administrator has disabled public write access.

Why are some effects super slow in OpenGL? 1 year 9 months ago #8

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 688
  • Thank you received: 764
OpenGL is weird indeed. I have some volumetric cloud shader with a loop that runs 800 iterations - death for everything in HLSL but runs fine. So it is really depending on the shader, you can't nail it down to one of the two API's being faster than the other.
Last Edit: 1 year 9 months ago by Marty McFly.
The administrator has disabled public write access.