Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2 3

Author Topic: [0.95.1a-RC6] Fast Engine Rendering v1.1.2 - Combat FPS Booster  (Read 81227 times)

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
[0.95.1a-RC6] Fast Engine Rendering v1.1.2 - Combat FPS Booster
« on: September 13, 2021, 02:13:19 PM »

Fast Engine Rendering v1.1.2



Uses modern OpenGL rendering techniques to efficiently render custom engine plumes. The purpose of this mod is a performance boost, taking better advantage of GPU horsepower. The performance boost is found by using a single batch call to render plumes in a single operation, avoiding the lengthy frame time that vanilla uses to render engine plumes iteratively with fixed function rendering.

Requires a GPU that supports OpenGL 3.3

Features:
- Replace SHIP (and fighter) engine plumes and glows with a fast instanced renderer. Moderate testing suggests a ~25% increase in performance in large battles with many fighter/ships, your mileage may vary.
- Crisp and smooth engine visual

Caveats:
- Does not affect missile engines, they will still use vanilla behaviour.

v1.1.2
-visual improvements
(full changelog in mod folder)

Vanilla




FER

« Last Edit: March 20, 2022, 07:01:53 AM by tomatopaste »
Logged

dcong89

  • Ensign
  • *
  • Posts: 39
  • Work Hard Play Hard
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #1 on: September 14, 2021, 07:47:28 AM »

keep up wonderful work ,my commander , i will try every mods you made !
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #2 on: September 15, 2021, 12:22:40 AM »

Small update fixing memory leak and engine flameouts.
Logged

BreenBB

  • Commander
  • ***
  • Posts: 150
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #3 on: September 15, 2021, 12:52:02 AM »

Game definitely needs more mods like this.

Also small offtop, interesting how work on Pearson Exotronics are goes?
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #4 on: September 15, 2021, 06:30:46 AM »

Game definitely needs more mods like this.

Also small offtop, interesting how work on Pearson Exotronics are goes?

will release sometime :)
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7173
  • Harpoon Affectionado
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #5 on: September 15, 2021, 09:15:38 AM »

This is fantastic - lets see how it works on my AMD graphics card with its poor openGL performance...
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 712
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #6 on: September 15, 2021, 09:17:46 AM »

Super impressive.

Kulverstukass

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #7 on: September 15, 2021, 01:17:00 PM »

This is invaluable, thank you very much!
Logged
Buckle up for broken english vocabulary, comrade!

Kadatherion

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #8 on: September 16, 2021, 02:30:18 AM »

Sorry for the dumb question, but what does "any other modded effects will not take effect" mean exactly? Will modded effects just still use the vanilla rendering, so they aren't covered by this method (meaning no harm done), or would they stop working at all due to incompatibility (which would actually be an issue)?
Logged

Helldiver

  • Captain
  • ****
  • Posts: 378
  • space fruit
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #9 on: September 16, 2021, 05:55:15 AM »

Sorry for the dumb question, but what does "any other modded effects will not take effect" mean exactly? Will modded effects just still use the vanilla rendering, so they aren't covered by this method (meaning no harm done), or would they stop working at all due to incompatibility (which would actually be an issue)?

They stop working at all (for example the Xhan Occuklop's engine system's green flares no longer appear).
Logged
Afflictor bean plushie that glows purple when you squeeze it
30$

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #10 on: September 16, 2021, 07:53:47 AM »

Sorry for the dumb question, but what does "any other modded effects will not take effect" mean exactly? Will modded effects just still use the vanilla rendering, so they aren't covered by this method (meaning no harm done), or would they stop working at all due to incompatibility (which would actually be an issue)?

There is no API method to detect if an engine is fading to another colour at a particular point in time. I am fully aware of how the game does it, it is just not accesible to mod scripts.

In the situation of a mod script attempting to change the engine colour, the FER flare will simply not change colour. Otherwise it will behave as expected, such as changing in size, depending on the system.
Logged

Kadatherion

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #11 on: September 16, 2021, 06:30:03 PM »

I see, thanks for clarifying. Guess I'm skipping this then on my desktop, since luckily I get solid fps and I do indeed play with a few ships with modded systems that are supposed to change their engine colours. But I'll be sure to give it a try next time I'm on my potato laptop :)
Logged

TimeDiver

  • Captain
  • ****
  • Posts: 345
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #12 on: September 18, 2021, 11:20:01 PM »

Is there any reason why this mod isn't flagged as "utility: true" in mod_info.json?

If so, then removing the mod (once a save game is created with it enabled) isn't an option?
Logged

Raio_Verusia

  • Ensign
  • *
  • Posts: 26
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #13 on: September 19, 2021, 12:36:34 AM »

Is there any reason why this mod isn't flagged as "utility: true" in mod_info.json?

If so, then removing the mod (once a save game is created with it enabled) isn't an option?

I would like an answer to this as well.
Logged

pairedeciseaux

  • Captain
  • ****
  • Posts: 340
    • View Profile
Re: [0.95a-RC15] Fast Engine Rendering - Combat FPS Booster
« Reply #14 on: September 19, 2021, 05:40:38 AM »

Has anyone had success running this mod on macOS?  :)

I have tried, but it fails.

The short story is: it looks like it is impossible because of chicken & egg issue related to Starsector relying on old OpenGL features, the mod relying on newer OpenGL / GLSLang features, macOS requiring software to select newer OpenGL profile for newer features... and macOS not allowing to mix older and new features anyway. Please note I don't know what I am talking about.

Long story:
Spoiler
Starsector log:

11898 [Thread-3] INFO  com.fs.starfarer.launcher.ModManager  - Saving enabled mod list [fast_engine_rendering|lw_lazylib]
12987 [Thread-4] INFO  com.fs.starfarer.StarfarerLauncher  - Running with the following mods (in order of priority):
12987 [Thread-4] INFO  com.fs.starfarer.StarfarerLauncher  -     Fast Engine Rendering [id: fast_engine_rendering] [version 1.0.3] (from /Applications/Games/Starsector.app/Contents/Resources/Java/../../../mods/FastEngineRendering)
12987 [Thread-4] INFO  com.fs.starfarer.StarfarerLauncher  -     LazyLib [id: lw_lazylib] [version 2.6] (from /Applications/Games/Starsector.app/Contents/Resources/Java/../../../mods/LazyLib)
12990 [Thread-4] INFO  com.fs.starfarer.StarfarerLauncher  - Mod list finished
12990 [Thread-4] INFO  com.fs.starfarer.settings.StarfarerSettings  - Loading settings
12990 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [ABSOLUTE_AND_CWD: null (data/config/settings.json)]
12996 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [DIRECTORY: /Applications/Games/Starsector.app/Contents/Resources/Java/../../../mods/FastEngineRendering (data/config/settings.json)]

[...]

22397 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/hound/hound_luddic_church.png (using cast)
22423 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/stations/module_medium_pd1.png (using cast)
22438 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/mercury/mercury_substandard.png (using cast)
22450 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/wasp_ftr.png (using cast)
22614 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: /Applications/Games/Starsector.app/Contents/Resources/Java/../../../mods/FastEngineRendering]
22614 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [lazylib_settings.json]
22619 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [mod_info.json]
22620 [Thread-4] INFO  org.lazywizard.lazylib.LazyLib  - Running LazyLib v2.6, built for Starsector 0.95a-RC8
22631 [Thread-4] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/particlealpha32sq.png (using cast)
22652 [Thread-10] INFO  sound.public  - Creating streaming player for music with id [miscallenous_main_menu.ogg]
22653 [Thread-10] INFO  sound.H  - Playing music with id [miscallenous_main_menu.ogg]
23104 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error creating vertex shader
ERROR: 0:1: '' :  version '330' is not supported
ERROR: 0:3: 'layout' : syntax error: syntax error

java.lang.RuntimeException: Error creating vertex shader
ERROR: 0:1: '' :  version '330' is not supported
ERROR: 0:3: 'layout' : syntax error: syntax error

   at data.scripts.shaders.util.fer_ShaderProgram.createVertexShader(fer_ShaderProgram.java:26)
   at data.scripts.shaders.fer_EngineFlareShader.<init>(fer_EngineFlareShader.java:48)
   at data.scripts.plugins.fer_CombatEffectsPlugin.init(fer_CombatEffectsPlugin.java:14)
   at com.fs.starfarer.title.C.OO0O$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.A.B.รต00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.init(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.prepare(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:745)


-----

Fast Engine Rendering mod uses GLSLang 3.30

   https://github.com/automatopaste/fast-engine-rendering/blob/main/data/shaders/engineflare.vert
   https://github.com/automatopaste/fast-engine-rendering/blob/main/data/shaders/engineflare.frag

For reference, ShaderLib / GraphicsLib mod uses GLSLang 1.10

   https://bitbucket.org/DarkRevenant/graphicslib/src/master/src/data/shaders/lights/lights.vert
   https://bitbucket.org/DarkRevenant/graphicslib/src/master/src/data/shaders/lights/lights.frag

Using GLSLang 3.30 on macOS requires explicitly choosing the appropriate OpenGL profile

   https://github.com/KogeLabs/Ockero/issues/4
   https://github.com/KogeLabs/Ockero/commit/2bcacaa5b22f9b83998641dd6ce108a14e53e7c6
   https://stackoverflow.com/questions/20931528/shader-cant-be-compiled/20932820#20932820

LWJGL 2 - choosing OpenGL profile

   http://forum.lwjgl.org/index.php?topic=5777.0

StarSector is built on the OpenGL Fixed Function Pipeline, according to several messages posted by Alex on the forum

   https://fractalsoftworks.com/forum/index.php?topic=4106.msg68565#msg68565
   https://fractalsoftworks.com/forum/index.php?topic=7677.msg127142#msg127142
   https://fractalsoftworks.com/forum/index.php?topic=7677.msg127158#msg127158
   https://fractalsoftworks.com/forum/index.php?topic=22480.msg339117#msg339117

Fixed Function Pipeline removed from OpenGL 3.1 and above

   https://www.khronos.org/opengl/wiki/Fixed_Function_Pipeline

On macOS, software can use either OpenGL 2.1 features or OpenGL 3.2+ features, software can't use both together

   https://www.khronos.org/opengl/wiki/OpenGL_Context - see "Platform Issue (MacOSX)"

   (so my understanding is you can't have both Fixed Function Pipeline and GLSLang 3.30 working together on macOS)

GLSLang specifications, for reference

   https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.10.pdf
   https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.3.30.pdf
[close]
Logged
Pages: [1] 2 3