r/shogun2 • • Oct 19 '26

I fixed Shogun 2 CE's rendering pipeline to boost GPU Usage

tl;dr I dug into Shogun 2 CE's rendering pipeline to make it more efficient and was able to overhaul the core rendering pipeline, giving us 30%+ boosts to FPS. Drop the files into Shogun 2 CE's game folder and run. I hope this works as well for you as it does for me, I would really appreciate benchmark results. If it helped you, I'd appreciate a star!

https://github.com/DudeCmonMan/s2fix

When Shogun 2 CE was announced, I was pretty hyped - despite the small list of changes for a remaster, having to nuke all my mods, paying again, etc. For me, the most important thing was the performance. I was crossing my fingers, that buried under the "graphical changes and 64 bit engine", that they upgraded the game to actually be able to leverage modern CPU / GPUs. I wanted to enjoy a nostalgic vanilla Shogun 2 with 1440p res, improved textures, and buttery smooth framerates.

As we know now, that is not the case. The original bottlenecks that existed in 2011 Shogun 2 are still in the game. There are hardly any changes to the rendering pipeline that would actually make the game run smoother in 2026. Still single-threaded, still limited by a single core on your CPU, still submitting a billion draw calls inefficiently to your GPU. No matter how good your CPU or GPU is, big battles will still have your computer rendering on 1 core and 40% GPU usage. Unacceptable for a 2026 remaster.

I won't go into detail on the process I used to actually find and fix these issues for my own sake. I will only be releasing the fixes + guidance to CA on where they need to fix things. This is also NOT an M2EX type mod to the game, I don't have the time to do the work that Mataboo is supposed to do, my job beats my ass enough. This is only limited to the rendering pipeline and limited to what I can find without source code.

I also want to warn you that this is a ymmv situation. I did my best with what I could patch, it will never beat a proper source code fix from the devs. If your GPU is already maxed out all the time, this won't help you. I suspect that with modern GPUs, most people will find that it does boost FPS in a lot of situations (especially during heavy fighting).

Shogun 2, Medieval 2, Rome Total War, etc. occupy a special place in my heart and I was so sad to see such a great opportunity to remaster the game go to waste. A proper Shogun 2 2026 would have been an absolute banger of a release.

I'm going to continue on this project at my discretion, I want to enjoy high fps Shogun 2. If there's enough interest, I'll consider re-implementing this for OG Shogun 2, since clearly CE's got some issues to figure out. It was quite a bit of work tracing the rendering paths and making all the harnesses to debug everything, but after digging into it, I have a feeling that a lot of my learnings can probably applied to OG Shogun 2. My thinking was that Shogun 2 CE is the new game and that I should lean into the more modern tech of Shogun 2 CE. Looks like I was wrong, since they nuked the game from Steam hah!

There's a lot more work to do if I go down this path. I pray that CA / SEGA actually invests the proper time to fix this game. I would be happy to come on as a consultant to see the source code and find out how to properly fix it, hit me up CA. I just want a properly functioning game.

Obligatory Yarimazing!

For those that care, I know it's a touchy topic especially with the whole AI dogwater upscales in CE (I'm livid about this, it makes AI usage look terrible). I used AI to help me investigate possible leads, but all the ideas and applied expertise is mine. The test harnesses, a/b testing, debug sandboxes, game simulation + mocking, etc. all that is from previous experience. There is very real work going on here, AI is just making my work faster - as if I had a team executing my vision. Guys please, I already work my ass off on the weekdays, let me have a fun weekend project - this release is the result of that. One weekend was able to turn up 30% in performance.

67 Upvotes

26 comments sorted by

19

u/No-Debate-3403 Oct 19 '26

I’m wondering how many of these community “fixes” are just throwaways since we’ll probably never see CE again, or at least it will be in another form. The better bet is most likely to use the knowledge and patch OG version until this things settles.

7

u/Meisgoot312 Oct 19 '26

It better come back, we spent money for it. As for patching OG shogun, I’m open to the idea, but I want to see where things go. My best hope is that CA sees what I fixed and just does it themselves. A peasant can always dream

4

u/madladhadsaddad Oct 19 '26

Hopefully the developers are in here and implementing these fixes into the game so we won't need the community patches.

1

u/Kiriima Oct 20 '26

We will obviously get back a fixed CE so it doesn't remain the last thing CA did before 40k release. Even if it's SEGA and not CA.

9

u/manila_traveler Oct 19 '26

Your mod & the one published by JakeTheRipper are the ones I'm most keen to find. You can count on modders to add more provinces, more clans, changes to game design, etc. according to their individual vision for the game, but we're all doing it from the base platform of an unoptimized Warscape engine. Thank you for sharing these efficiency tweaks with the community.

1

u/Meisgoot312 Oct 19 '26

I appreciate that. I literally just wanted a faster running shogun 2 man, I’m sad

4

u/Patrick_Atsushi Oct 19 '26

Just wondering, is it done by de-compiling with LLMs?

I think the norm in software engineering/selling field is going to change enormously due to this possibility.

2

u/Meisgoot312 Oct 19 '26

That’s part of it, it’s a combination of decompile, memory analysis, rendering analysis, etc.

ELI5 You need all of it in order to prove that what you do is actually having the intended effect. Decompiling is like getting a hand drawn map to a location, you actually need to go to the locations in order to see what they look like. Sometimes they have extra paths you didn’t see, sometimes it’s a dead end, and most of the time you did something that broke something somewhere else.

Source code in this sense is Google Maps , but we don’t have that hah

1

u/Patrick_Atsushi Oct 19 '26

I actually had some experience on realtime rendering pipelines and was wondering how readable the decompiled code will be.

Interesting. I think I’ll try to decompile some test programs to see how it has suddenly enabled so many decompiled projects.

2

u/Meisgoot312 Oct 19 '26 edited Oct 19 '26

Go for it man, it’s easier than ever before. Feel free to shoot me a dm if you have any questions

Edit: It’s easier than before, but can still be quite complicated / confusing. The generated code is what the decompiler thinks* it looks like not what it actually is. Decompilation is not a magic cheat code 👽

1

u/Patrick_Atsushi Oct 20 '26 edited Oct 20 '26

Hmm I’ve tried it on my old rendering test and it has done a good job. I think the magic in this is now the machine can do the “hard work” part that otherwise will overwhelm the human haha

Also I ask the AI about the legal issue and it seems reverse engineering is essentially legal, I think that’s why CA didn’t take any action on m2ex etc.

Not sure when they will make it illegal though :p

Had better to be quick before they disable it on models haha

6

u/Then_Law8990 Oct 19 '26

Honestly, they really screwed up big time by leaving the game in such a state and with so little content. The original was a AAA title back in its day, and given the boom surrounding the series, it could have sold a ton. I don’t know if they’re just lazy or if they’ve lost the quality they used to deliver. A disastrous effort like this just ruins the brand.

4

u/Meisgoot312 Oct 19 '26

I’m genuinely sad that this is how it turned out. There are some nice things they added like Japanese voice overs and the toggleable new animations, but I’m just so surprised how much they didn’t do for the game itself. I’d rather they fix the performance and bugs over the new animations (the Japanese voice overs are a must though, considering it’s Japan).

1

u/West_Incident744 Oct 26 '26

idk why but its causes weird gpu glitch and artefacts in battles :(

2

u/Meisgoot312 Oct 26 '26

This is the older post, could you use the updated versions?
https://github.com/DudeCmonMan/s2fix/releases

If it persists, please use: https://github.com/DudeCmonMan/s2fix/issues to submit a bug. The more details you add, the better.

I'm getting mixed reports from people with so many different hardware, some people it works flawlessly, others have artifacts. I'm using github to track everything. I would love your feedback. I am working on making a debug addon to help me debug.

1

u/West_Incident744 Oct 26 '26

oh i did the latest one i thought this was the latest post , and i have weird graphical artefacts glitches when in combat the world map is fine but in battles its going crazy and there is still a bug i wish you could look into its not about ur fix its more of a game engin issus when archers fire flamming shots if you zoom into the unite that is getting shot the fps will tank and drop like crazyyyyy

1

u/Meisgoot312 Oct 26 '26

Haha, no problem. I have a new pre-release build you can try. Please read the bottom of this post https://github.com/DudeCmonMan/s2fix/issues/1 . If you can contribute in the same way, I would appreciate it!

1

u/West_Incident744 Oct 27 '26

tho the new fix solve the glitchs issus but i dont see much of performance boost :( unlike atilla where i was giga blown away by how the game became smooth with shogun unfrtly nothing change everything smooth but when army ducking to eachother its go downhill...

0

u/[deleted] Oct 28 '26

[deleted] — view deleted comment

2

u/Meisgoot312 Oct 28 '26

My other reply to you - copy and pasted.

It's not a trojan, I've explained it a few times and its written in the github releases. The release can be picked up by AV because it injects itself into Shogun 2 and patch it in realtime. All .dll based mods are at risk of being picked up by AV. All of the source code is on github and is auto-built from github. You can check it yourself.

1

u/PetoPera Oct 28 '26

Assuming what you say is true, why is it impossible to remove it with antivirus software? Why does it block offline scans even when launched from PowerShell?

1

u/Meisgoot312 Oct 28 '26 edited Oct 28 '26

1

u/PetoPera Oct 28 '26

Well, The antivirus really crashed and I really couldn't remove the file using it, and it's also true that when I started the offline scan with PowerShell I got an error and it wouldn't start. But after running the MRT tool and having done various "researches", regarding the functioning of this fix I must first of all apologize for the accusation and that if you want I will remove the comments and then I wanted to thank you because the modification works and works well too.

2

u/Meisgoot312 Oct 28 '26

Thank you for that, I appreciate your apology. I hope you enjoy the new frames man 😎

Whether or not you keep your comments is up to you, I have no opinion, I'm already happy to accept your explanation and apology.

2

u/PetoPera Oct 28 '26

I removed them because I don't want others to think badly of your work, as I unfortunately did. Sorry again and thanks for understanding 🫂

2

u/Garret1510 Oct 20 '26

You dont need to explain yourself. AI is awesome in the right hands and without it i would have so much stress with many things. For example Linux is a completely new thing for me and AI helped with most things while showing me what i NEED to know in order to use it properly.

Also these changes should have been done by mataboo, i really dont understand why this could have happened. Like they think us stupid or something else happened

1

u/Schattenwaffen Oct 26 '26

Many thanks.

One question, does it reduce CPU usage?