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

QuadMesh Shader technique in XR #89834

Open
RiddleMajor opened this issue Mar 23, 2024 · 7 comments
Open

QuadMesh Shader technique in XR #89834

RiddleMajor opened this issue Mar 23, 2024 · 7 comments

Comments

@RiddleMajor
Copy link

RiddleMajor commented Mar 23, 2024

Tested versions

Godot 4.2.1, 4.2.2.rc2

System information

Using Quest 3 + Sidequest

Issue description

I am using a Quad Mesh placed in front of the camera with a shader material applied. It works correctly inside Godot preview editor and on a windows exe file, but when loading the game on quest, the mesh turns to black, obscuring my vision. I can tell it's the mesh causing the issue because 1. I can put my hands slightly through the mesh and see them 2. If I delete the mesh, it works, just without the shader.

Steps to reproduce

  1. Open XR
  2. Quad Mesh in front of camera with shader material applied
  3. Export to Quest
  4. Launch

Minimal reproduction project (MRP)

This would take a while, but the specific shader I'm using is in this zip file.
psx_camera_shader.zip

@AThousandShips
Copy link
Member

Can you please try with 4.2.1 or 4.2.2.rc2?

@RiddleMajor
Copy link
Author

RiddleMajor commented Mar 24, 2024

I am completely unable to export the project on 4.2.2.rc2, I get the error
[Export]: Unable to copy and rename export file:

Configure project:
WARNING: The option setting 'android.override Path Check=true' is experimental.
The current default is 'false'.
Task :copyAndRename DebugApk FAILED
FAILURE: Build failed with an exception.
*What went wrong:
Execution failed for task ':copyAndRenameDebugApk'.
Cannot access a file in the destination directory. Copying to a directory which contains unreadable content is not supported. Declare the task as untracked by using Task.doNotTrackState(). For more information, please refer to https://docs.gradle.org/8.2/userguide/incremental_build.html#disable-state-tracking in the Gradle documentation. > Failed to create MD5 hash for file content.

@RiddleMajor
Copy link
Author

4.2.1 Will let me export, but shader still not working.

@ferminLR
Copy link

@RiddleMajor I have not been able to replicate your issue with a Quest 2 in 4.2.1, but I noticed something: your shader seems to work properly in the areas of the screen where there are objects, but the area of the viewport covered by the background appears black.

Maybe that gives you a hint to solve your issue. Could it be the draw distance is shorter on your Quest so there isn't geometry visible in the background?

@RiddleMajor
Copy link
Author

I might be miss interpreting your comment, but my game is in an inclosed space, so there is no background being seen.

@ferminLR
Copy link

Ah gotcha, in that case yeah, the shader should work.

@RiddleMajor
Copy link
Author

If it helps I'm using the start scene in this: https://github.com/GodotVR/godot-xr-template as a basis for my game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants