Elements missing when scoping in Valkyria Chronicles II (ULUS-10515)
What happens?
Things such as objects from scenery disappear while scoping. Sometimes soldiers get cropped as well if they're in front of those objects. Happens on Vulkan and Direct3D 11.
What should happen?
Everything should be fine as is with Direct3D 9 and OpenGL.
What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.
- Windows 10 64 bit;
- Acer Aspire ES15;
- Intel Celeron QuadCore N3450;
- Intel HD Graphics 500 (driver ver. 27.20.100.8587);
- 4 GB RAM;
- ppsspp v1.10.3-735-ga0251eae2

Here is a Save State for testing: ULUS10515_1.00_2.zip
As for cropped units:

@justafella could you send me the GE Dump for scoping?
How do I do it?
How do I do it?
Just go to http://ppsspp-debugger.unknownbrackets.org/
Well, if I got that right, these are the files:
Scoping: recording (2).zip
Scoping+zoom: recording (3).zip
If you need it, whenever I come across the cropped unit problem again I'll bring its GE dump as well
Thanks, those will be useful!
If you need it, whenever I come across the cropped unit problem again I'll bring its GE dump as well
Here it is:
Cropped unit on scope: recording.zip
Cropped unit on scope+zoom: recording (1).zip
Hope it helps you guys
Well, here's something interesting.
In Valkyria Chronicles 3, I reproduced easily. In the GE debugger, I then disabled the depth clamp flag for a frame, which fixed it, because background stuff was clamping over the character.
But then I realized that it stayed fixed - nothing was turning clamp back on. I played through a bunch of the game without it getting set back enabled. Instead, returning to the chapter map finally re-enabled it. It also re-enabled when going to the deploy screen, each time when "Now loading" was being shown. Interestingly, for the loading into the mission - it did not set the depth clamp flag.
So it could be this is depth clamp behaving wrong - but it could also be that, somewhere, something is supposed to clear this and isn't? Well, just a guess. I can't find anything obvious that should be resetting it (like contexts on lists or signals or CALLs etc.)
-[Unknown]
The behavior described in #12058 should fix this.
-[Unknown]
I have tested the game with the same save state I provided back then, using the latest buildbot. My system remains the same apart from the graphics driver's version (that I keep updated). I tested it on all backends (with hardware transform on and then off) but only D3D9 worked properly. I couldn´t understand everything here, so if there is something more I could do for testing as an end-user, I´ll gladly help.
If you try the artifacts in #14833, it should fix it on modern systems.
-[Unknown]
I haven't been able to test this yet because I can't seem to build it right. I'm all new to this and even with the instructions provided I'm still messing up somewhere. I'd be grateful if you could build it and send me a .zip or something.
There's a build attached to the under artifacts.
- Go to https://github.com/hrydgard/ppsspp/pull/14833/checks.
- Select Artifacts near the top right.
- Select Windows x64 build (or similar.)
macOS, Windows ARM64, and Linux builds are available too. These are not permanent however, and only last for 90 days after the code in the pull request is most recently updated.
-[Unknown]
IT IS FIXED!!!! Thank you!!!!! You may close the issue 🥇
Thanks for reporting!
Let's close it when that branch is merged - I'm not gonna merge it for 1.12, due to the risk of breakage. It will however be merged soon after that release, and then we can close this.
Does not seem to fix the issue for me on macOS 11.6 with https://github.com/hrydgard/ppsspp/pull/14833 on Vulkan. OpenGL implementation is unsupported as explained in https://github.com/hrydgard/ppsspp/pull/14833#issuecomment-922460423.
Confirmed that the latest master of https://github.com/KhronosGroup/MoltenVK (https://github.com/KhronosGroup/MoltenVK/commit/f78ab20b79f186eae57606442293163c748de5d3) does not solve the issue at the very least.
Vulkan on MacOS uses MoltenVK, it could be that it lacks support for the clip/cull distances.
That somewhat surprised be, but you are right:
(lldb) p caps_.clipCullDistanceSupported
(bool) $0 = false
(lldb) p vulkan->GetDeviceFeatures().enabled.shaderClipDistance
(const VkBool32) $1 = 1
(lldb) p vulkan->GetDeviceFeatures().enabled.shaderCullDistance
(const VkBool32) $2 = 0
There is a note on that in https://github.com/KhronosGroup/MoltenVK/issues/203#issuecomment-419676902. Interestingly, culling appears to be rather rarely used by the games (https://github.com/KhronosGroup/MoltenVK/issues/203#issuecomment-494815290), so one can expect it not to land any soon. I wonder if the alternative can be found here.
To be fair, software one (i.e. HardwareTransform = False) does work fairly well for me with both OpenGL and Vulkan though after fixing up the hardware usage requirements in https://github.com/hrydgard/ppsspp/pull/14833#discussion_r711746731 without performance issues. However, this is a desktop (11700k clocked at 5.0 GHz to be precise), laptops may have bigger issues.
Is there any way I can get an android build with these fixes? I have a Moto G9 Play with Qualcomm SM6115 Snapdragon 662 (11 nm) Octa-core (4x2.0 GHz Kryo 260 Gold + 4x1.8 GHz Kryo 260 Silver) Adreno 610
Is there any way I can get an android build with these fixes? I have a Moto G9 Play with Qualcomm SM6115 Snapdragon 662 (11 nm) Octa-core (4x2.0 GHz Kryo 260 Gold + 4x1.8 GHz Kryo 260 Silver) Adreno 610
You need to compile this https://github.com/hrydgard/ppsspp/pull/14833 all by your self.
It'll get merged in not very long and included in git builds. It should work on Adreno, but it won't yet work on Mali, so it's not a complete fix. Be warned there are likely to be issues on some devices once it's merged, so I can't say for sure it'll work on your device.
-[Unknown]
thanks(^o^). working on v1.12.3-39-g16bf5197e
vulkan
adreno 530
Valkyria Chronicles 3

I try the dump and here's the results.

@Gamemulatorer not sure I understand, is that a failure or success? Which GPU on your device?
@Gamemulatorer not sure I understand, is that a failure or success? Which GPU on your device?
I think is a success because as far as I can see all elements is present 🤔🙂
Ok, so several successful reports. I'm gonna close this, even though the new code doesn't have full effect on Mali and D3D9 yet.
@hrydgard while D3D9 is rather old, macOS VK/GL is considerably new. Shall we have a separate issue for the added code being incompatible with macOS? I believe a shader implementation will still be faster than a software one.
@vit9696 who says the added code is incompatible with macOS?
Apple GL doesn't expose cull distance, possibly also with Vulkan. But I thought this one was probably fixed by clipping, so it might be fixed anyway? If it requires cull, then I think it's still related to all the other open guardband issues.
-[Unknown]