Hi, all. In trying to create an effect for the homebrew I'm working on, I created an example where I modified citro2d to use a shader I wrote. I then tried extending citro2d to be able to use one of two shaders at will, and created a scene where I draw some sprites with one shader then switch to using the other. The moment I attempt to draw something with the other shader active, the GPU hangs when running on real hardware. On Citra, everything works as I intend.
I'm really at my wit's end. Anyone have any idea as to what kinds of stuff hangs the GPU? It baffles me because the composite-scene example in the 3ds-examples repo I'm taking cues from of course works just fine...
Thanks!!
Drawing a citro2d scene with 2 shaders?
Re: Drawing a citro2d scene with 2 shaders?
After struggling a little while with this, I finally figured it out. The issue appears to be that the GPU does not like it if you try to draw using a shader program with a geo component and another without one in the same frame. (I'm assuming it's not just some quirk of citro3d/2d, at least.) You could draw one frame with only a vertex shader, then the next with both a vertex and geo shader, and it would work just fine. They just have to match from frame to frame.
Why hasn't this been documented anywhere? Has anyone else come across this?
Why hasn't this been documented anywhere? Has anyone else come across this?
Re: Drawing a citro2d scene with 2 shaders?
I think I may have experienced a similar issue. I was trying to add a geo shader for a particle system. The geo shader was only used in frames where particles were visible. It would work for a little while but the gpu would hang after particles were rendered. I assumed I was doing something wrong - but maybe not? This makes me think there is an issue with citro3d.
Who is online
Users browsing this forum: No registered users and 1 guest