Fast Engine Rendering v1.1.2(https://img.shields.io/github/downloads/automatopaste/fast-engine-rendering/v1.1.2/total?label=Download_v1.1.2) (https://github.com/automatopaste/fast-engine-rendering/releases/download/v1.1.2/FastEngineRendering_v1.1.2.zip)
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
(https://i.imgur.com/TyT1tf8.png)(https://i.imgur.com/YYBk8n6.png)
FER
(https://i.imgur.com/JvzpC75.png)(https://i.imgur.com/prjk0Zm.png)
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
Fast Engine Rendering v1.1.0
v1.1.0
-updated shader code to optimised versions from Jon Micheelsen
-tweaked glow visuals
-fixed bugs with system activated engines for good hopefully
-reload engine data with F8
-fixed bug with force override setting
-enabled utility flag
Download in OP.
Been playing with this mod and it does improve performance on my system quite a bit! I think I've stumbled across a rare crash:
I recently experienced a CTD in combat with no java error message, but it did generate an hs_err_pid file (attached) with:
data.scripts.shaders.fer_EngineFlareShader.getFlare(Lcom/fs/starfarer/api/combat/ShipEngineControllerAPI$ShipEngineAPI;)Ldata/scripts/shaders/fer_EngineFlareAPI; (77 bytes) @ 0x0000000002d83276 [0x0000000002d82d00+0x576]
It seems that Fast Engine Rendering (fer) might be the culprit? I've been playing with it for a few hours now and this is the first crash.
Mod list:
Spoiler
"chatter" (combat chatter),
"lw_console",
"DetailedCombatResults",
"fast_engine_rendering",
"lw_lazylib",
"MagicLib",
"TAR" (simulator targets)
Log end (though its not very informative in this case):
Spoiler
5313194 [Thread-9] INFO sound.oo0O - Creating streaming player for music with id [faction_pirate_encounter_02_hostile.ogg]
5313194 [Thread-9] INFO sound.OooO - Playing music with id [faction_pirate_encounter_02_hostile.ogg]
5315620 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Chatter plugin initialized
5316632 [Thread-7] INFO sound.oo0O - Cleaning up music with id [faction_pirate_encounter_02_hostile.ogg]
5316697 [Thread-9] INFO sound.oo0O - Creating streaming player for music with id [battle_ambience_01.ogg]
5316697 [Thread-9] INFO sound.OooO - Playing music with id [battle_ambience_01.ogg]
5327532 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship Black Swan, isEnemy 0
5327532 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship Alisanos, isEnemy 0
5327532 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship ISS Venusean, isEnemy 0
5327532 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship Coatlicue, isEnemy 0
5327532 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship Griffin, isEnemy 0
5327533 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship ISS Starfarer, isEnemy 0
5327533 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship ISS Old Earth Or Bust, isEnemy 0
5328431 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship null, isEnemy 0
5328431 [Thread-3] INFO org.histidine.chatter.combat.ChatterCombatPlugin - Adding ship null, isEnemy 0
Graphics card is an RX580 (AMD) and processor is a Ryzen 1600, Windows 10.
[attachment deleted by admin]
After enabling this mod, engine plumes seem to have grown in both size and brightness, has anyone else had this? It ends up being quite distracting.
Here are a few images for comparison:
Vanilla
Spoiler
(https://i.imgur.com/DiHpTKM.png)(https://i.imgur.com/yny8EBY.png)
FER
Spoiler
(https://i.imgur.com/3rOaj2y.png)(https://i.imgur.com/E81dfUP.png)
FER again, except in combat, the large remnant vessel is almost half engine plume
Spoiler
(https://i.imgur.com/M2RbOP7.png)(https://i.imgur.com/OXSDzOp.png)
There appears to be an issue when engines are located on modules that move independently:
Spoiler
(https://i.imgur.com/AmLD8t6.png)