FINAL FANTASY VII REBIRTH

FINAL FANTASY VII REBIRTH

View Stats:
SquareEnix it's awesome that you guys precompile shaders.. BUT
You haven't created a cache of nearly enough shaders. The game still stutters often when encountering or doing things for the first time all over the place. Especially in cutscenes.

You guys need to have QA play throughout the entire finished game and collect all the PSOs the game uses, then integrate that PSO cache back into the game so it can pre-compile everything. My guess is that during development QA was building up caches but as the final game builds were being cooked a lot of that shader code they generated was outdated and so now there's gaps.

Please build up a bigger and better cache. Other than that, the game is simply amazing. No traversal stuttering from what I've played, which is really impressive for an UE4 title! Just please build a full PSO cache.

Edit: I wanted to provide proof it's shader compilation stuttering, so I made a video showing it. First time through, stutters everywhere. Second time.. perfectly smooth.

https://www.youtube.com/watch?v=TaCexKkwWLI&ab_channel=Remij_
Last edited by Self Destructive; Jan 25 @ 10:40pm
< >
Showing 1-15 of 18 comments
curt-s Jan 25 @ 9:03pm 
How did you come to the conclusion that it was the shaders?
Originally posted by curt-s:
How did you come to the conclusion that it was the shaders?
Because replaying the exact same scene did not have any stutters at all.
pretty sure it is indeed shaders that stutter it the first moment you load a new area, but i was told it was a ue4 thing so i assumed it wasn’t reasonably fixable. beyond that idk much about it
Originally posted by Iron Reaper:
pretty sure it is indeed shaders that stutter it the first moment you load a new area, but i was told it was a ue4 thing so i assumed it wasn’t reasonably fixable. beyond that idk much about it
Oh, it's absolutely fixable. They just have to play through the final game while collecting the PSOs, then rebuild it into the final cook so the game compiles all of the shaders. Right now it precompiles many of them.. but not nearly enough.
curt-s Jan 25 @ 9:15pm 
Originally posted by Self Destructive:
Originally posted by curt-s:
How did you come to the conclusion that it was the shaders?
Because replaying the exact same scene did not have any stutters at all.

oh, I thought maybe you debugged the UE4 shader pipeline so that you knew when shaders were being assembled post-cache building and watched the file system for related new object creations.

Maybe your specific system has directstream issues. I don't have stutters going area to area so I can't agree on there being a shader issue at all.
curt-s Jan 25 @ 9:16pm 
However, there does seem to be one single missing polygon in the sky geometry.. I wonder who else has seen it.
Originally posted by Self Destructive:
Originally posted by Iron Reaper:
pretty sure it is indeed shaders that stutter it the first moment you load a new area, but i was told it was a ue4 thing so i assumed it wasn’t reasonably fixable. beyond that idk much about it
Oh, it's absolutely fixable. They just have to play through the final game while collecting the PSOs, then rebuild it into the final cook so the game compiles all of the shaders. Right now it precompiles many of them.. but not nearly enough.

That's not what shaders are or how you cache them shaders are lliterally little programs that run on your GPU.
Last edited by MancSoulja; Jan 25 @ 9:17pm
Originally posted by MancSoulja:
Originally posted by Self Destructive:
Oh, it's absolutely fixable. They just have to play through the final game while collecting the PSOs, then rebuild it into the final cook so the game compiles all of the shaders. Right now it precompiles many of them.. but not nearly enough.

That's not what shaders are or how you cache them shaders are lliterally little programs that run on your GPU.
lol you have no idea what you're talking about. Yes, shaders are little programs which run on the GPU.. but guess how those shaders run? They have to configure parameters of the GPU to execute their code. DX12 and Vulkan use PSOs which contain the state of the GPU (the parameters) which the shader needs to run.

When developers create games, the shaders they create change the GPU pipeline state to be set a certain way to execute, and that state data can be collected and precompiled so that when the shaders require the state to be switched the driver already knows exactly which state to set the pipeline to and the shader runs with no stutter.

Shader compilation stuttering happens because shaders are waiting for the driver to compile the right state code.. which in DX12 are called PSOs. It's literally switching the state of the GPU to execute the code which causes these stutters, because to switch the state, the driver has to compile it.

Luckily we can pre-compile these PS0s by collecting all the states during development, and then having the engine precompile all these states ahead without needing the shaders to be drawn first.
Originally posted by Self Destructive:
Originally posted by MancSoulja:

That's not what shaders are or how you cache them shaders are lliterally little programs that run on your GPU.
lol you have no idea what you're talking about. Yes, shaders are little programs which run on the GPU.. but guess how those shaders run? They have to configure parameters of the GPU to execute their code. DX12 and Vulkan use PSOs which contain the state of the GPU (the parameters) which the shader needs to run.

When developers create games, the shaders they create change the GPU pipeline state to be set a certain way to execute, and that state data can be collected and precompiled so that when the shaders require the state to be switched the driver already knows exactly which state to set the pipeline to and the shader runs with no stutter.

Shader compilation stuttering happens because shaders are waiting for the driver to compile the right state code.. which in DX12 are called PSOs. It's literally switching the state of the GPU to execute the code which causes these stutters, because to switch the state, the driver has to compile it.

Luckily we can pre-compile these PS0s by collecting all the states during development, and then having the engine precompile all these states ahead without needing the shaders to be drawn first.

Developers do not sit there and play through the game to compile shaders as you said they compile the data during develpment. :tgrin:

A lot of Unreal's shaders come built in and just need pre-compiling.
Last edited by MancSoulja; Jan 25 @ 9:40pm
Originally posted by MancSoulja:
Originally posted by Self Destructive:
lol you have no idea what you're talking about. Yes, shaders are little programs which run on the GPU.. but guess how those shaders run? They have to configure parameters of the GPU to execute their code. DX12 and Vulkan use PSOs which contain the state of the GPU (the parameters) which the shader needs to run.

When developers create games, the shaders they create change the GPU pipeline state to be set a certain way to execute, and that state data can be collected and precompiled so that when the shaders require the state to be switched the driver already knows exactly which state to set the pipeline to and the shader runs with no stutter.

Shader compilation stuttering happens because shaders are waiting for the driver to compile the right state code.. which in DX12 are called PSOs. It's literally switching the state of the GPU to execute the code which causes these stutters, because to switch the state, the driver has to compile it.

Luckily we can pre-compile these PS0s by collecting all the states during development, and then having the engine precompile all these states ahead without needing the shaders to be drawn first.

Developers do not sit there and play through the game to compile shaders. :tgrin:
LOL YES THEY DO. They (meaning QA or the developers themselves) literally have to play through their and do precisely what I said.

Educate yourself.
https://www.eurogamer.net/digitalfoundry-2024-the-big-god-of-war-ragnorak-pc-tech-interview

God of War Ragnarok dev interview from Digital Foundry:

"Digital Foundry: Speaking of resources, DX12 has explicit compilation of PSOs, and it's my bugbear on PC. I hate it when it doesn't work and you get shader compilation stutter. I'm only early on, but I've noticed zero frame-time spikes during my playthrough, which is what you want to see. What exactly are you doing for PSOs?

Steve Tolin: Do we only have 30 minutes? [laughs] We're in the same camp as you - we use the #StutterStruggle hashtag the same as you and we take it to heart, because it's not something we want to see in our games.

The biggest issue and hurdle for a lot of that is that you need to have a full representation of all of your runtime render passes and everything offline, so that you can run all your materials through it to generate all the permutations for everything and then catch everything that's done.

Very early on we decided not to just have QA play the game and accumulate PSOs that way, then ship some pre-known set and hope in the wild that players don't look off into a corner. We did the full build offline and created the PSOs offline, so all of the data is known beforehand in the pipeline for us, and it took us a substantial amount of time to get that right."
https://www.eurogamer.net/digitalfoundry-2022-inside-marvels-spider-man-remastered-on-pc-the-nixxes-tech-interview

"Digital Foundry: So you mentioned PSO compilation which is my bugbear as of late. I mention it everywhere, I cannot stop talking about it and won't stop talking about it. The game does not suffer from prolonged stutter from just-in-time shader compilation. How is PSO compilation done for this game on PC?

Michiel Roza: In our case, we simply asked QA to play the entire game. And we then generate a cache, which contains all the PSOs and we just put the cache next to the game [as a file you can find in the game directory]. So what that means is, we just know beforehand, which PSOs will be used in-game. And if we then load all those PSOs in the loading screens, we're golden. It also helps that Insomniac's material handling is very lean, so we don't have a gigantic amount of PSOs."
Maybe Unreal Engine's official documentation will convince you??

https://dev.epicgames.com/documentation/en-us/unreal-engine/optimizing-rendering-with-pso-caches-in-unreal-engine

The steps to collect PSOs in Unreal are:

Play the game.

Log what is actually drawn.

Include this information in the build.

After that, on subsequent playthroughs the game can create the necessary GPU states earlier than they are needed by the rendering code.

This document describes the available PSO types in UE and the detailed processes for generating PSO caches.
Originally posted by curt-s:
Originally posted by Self Destructive:
Because replaying the exact same scene did not have any stutters at all.

oh, I thought maybe you debugged the UE4 shader pipeline so that you knew when shaders were being assembled post-cache building and watched the file system for related new object creations.

Maybe your specific system has directstream issues. I don't have stutters going area to area so I can't agree on there being a shader issue at all.
You can visually see the GPU driver cache build as the game stutters :D That's how you know it's shaders.

There's no issues on my end. The game simply doesn't precompile everything it needs to.
Gigantoad Jan 25 @ 10:42pm 
Isn't it weird that a game engine can't find all the shader permutations and provide a 100% precompilation to devs at the push of a button? Seems such a weird concept to me that the software that creates all the shaders doesn't keep track of them in such a way that this can be done easily.
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Jan 25 @ 8:59pm
Posts: 18