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

Hangs When Using Geometry Shader In Combination With 3D Drawing #53

Open
iMackshun opened this issue Mar 19, 2021 · 0 comments
Open

Hangs When Using Geometry Shader In Combination With 3D Drawing #53

iMackshun opened this issue Mar 19, 2021 · 0 comments

Comments

@iMackshun
Copy link

iMackshun commented Mar 19, 2021

To begin, I draw sprites using the geometry shader. I often draw 2D in 3D in various orders to achieve certain effects, such as 2D Background -> 3D Model -> Text. It seems that drawing in certain orders causes citro3D to hang, such that the main thread gets stuck in a loop. I didn't have this issue when I'd draw using only a vertex shader, so I'm sure it is related to me using the geometry shader. Under normal circumstances, the shader program works as expected. It is only when I draw sprites, and then draw a model that citro3D hangs. When drawing models, I use C3D_DrawElements to draw triangles with an index buffer. Whenever it hangs, I can no longer trigger the Luma menu, and must hard power off my 3DS.

To be more specific, here is a list of tests I've tried and the results.

  • Early 2D Draw (Works)
  • 3D Draw (Works)
  • 2D Draw (Works)
  • Early 2D Draw -> 3D Draw -> 2D Draw (Hangs)
  • 3D Draw -> 2D Draw (Works)
  • Early 2D Draw -> 3D Draw (Hangs)
  • Early 2D Draw (Works)
  • Early 2D Draw -> 2D Draw (Works)
  • 2D Draw -> 3D Draw (Hangs)

Here are the shaders I use.
Vertex Shader: https://pastebin.com/562LdNGk
Geometry Shader: https://pastebin.com/sHLtFUME

Here is the log of code execution.
Log: https://pastebin.com/mMnth0xD

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

No branches or pull requests

1 participant