Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Visual Bug: Vertex Explosion in Dead or Alive 5(PCSB00296) on Vita3K Android (V12) #693

Open
1 task done
surlup opened this issue Jan 11, 2025 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@surlup
Copy link

surlup commented Jan 11, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Affected Build(s)

VITA3K V.0.2.0 3621 (V12) Android Version

Description of Issue

When running Dead or Alive 5 (PCSB00296) on Vita3K Android version, there is a visual bug characterized by vertex explosion. The graphics for characters and environments appear distorted with lines and improper rendering, suggesting an issue with vertex data processing.

This issue does not occur on the PC version of Vita3K, indicating it might be related to the Android-specific implementation, such as Vulkan/OpenGL API or unimplemented stubbed functions.

Expected Behavior

Suggested Fixes:

Based on initial analysis, here are potential solutions to address this issue:

  1. Implement Stubbed Function: sceGxmMapVertexUsseMemory

This function appears as a stub in the logs without processing vertex data. Below is an example code snippet to address or start implementing this:

int sceGxmMapVertexUsseMemory(void* vertexMemory, size_t size, void** mappedAddress) {
if (!vertexMemory || size == 0) {
return SCE_ERROR_INVALID_VALUE;
}

// Simulate GPU memory allocation
*mappedAddress = malloc(size);
if (*mappedAddress == nullptr) {
    return SCE_ERROR_OUT_OF_MEMORY;
}

return SCE_OK;

}

  1. Validate SPIR-V Shaders for Vulkan

The generated SPIR-V shaders might not be compatible with certain Android devices. Add a shader validation step before execution:

VkResult validateShaderSpirV(const std::vector<uint32_t>& shaderCode) {
if (!isShaderValid(shaderCode)) {
return VK_ERROR_VALIDATION_FAILED_EXT;
}
return VK_SUCCESS;
}

  1. Use a Default Shader as Fallback

Provide a simpler default shader to replace the game’s shaders if they fail to load:

#version 450
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec3 inNormal;
layout(location = 0) out vec3 outColor;

void main() {
gl_Position = vec4(inPosition, 1.0);
outColor = normalize(inNormal);
}
Additional Information:

Emulator Version: Vita3K Android v12

Platform: Android

Graphics API: Vulkan

Game ID: PCSB00296 (Dead or Alive 5 Plus).

Reproduction Steps

  1. Use Vita3K Android version (v12 or earlier).

  2. Launch Dead or Alive 5 (PCSB00296).

  3. Observe the graphics; the game visuals are distorted, and vertex explosion artifacts are present.

Log File

PCSB00296 - [DEAD OR ALIVE 5 PLUS].log
"The characters and environments in the game appear distorted, with lines stretching outward, making the models look like they're exploding."

"The issue looks like improperly processed vertex data, where polygons are stretched irregularly." "This issue is Android-specific. Running the same game on the PC version of Vita3K renders everything correctly."

"Unfortunately, I couldn’t provide a screenshot due to device limitations. However, this issue can be reproduced by running Dead or Alive 5 (PCSB00296) on Vita3K Android version (v12 or earlier)."

System Configuration

CPU: MediaTek Helio G99
GPU/Driver: Mali-G57 MC2
RAM: 4GB RAM
OS: HyperOS ( Android14)

@surlup surlup added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant