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

Broken transition? #787

Open
protyposis opened this issue Mar 3, 2024 · 6 comments
Open

Broken transition? #787

protyposis opened this issue Mar 3, 2024 · 6 comments

Comments

@protyposis
Copy link

protyposis commented Mar 3, 2024

Describe the bug
When switching presets with a soft cut, a certain type of transition seems to be broken. See the bottom area in the attached picture and video below.

Screenshots
Screenshot_20240303_194814

Screen_recording_20240303_195732.mp4

Desktop (please complete the following information):
Using projectM 4.1 arm64 build on Android 11 (Nvidia Shield TV), but thought it may help to report it anyway. Please let me know if you need any other information.

ps: Thank you for this awesome piece of software!

@Blaquewithaq
Copy link
Contributor

It would be very helpful if you could provide the name of the preset you're displaying here!

@kblaschke
Copy link
Member

kblaschke commented Mar 3, 2024

It looks like the "plasma" transition is only affecting the bottom part of the screen, in the shape of a triangle - which would make me think that the actual transition quad is not rendered correctly for some reason. I've tested it many times, and have never seen this behavior, so can't really tell what's going on there. If you can create a OpenGL API trace for a frame with a broken transition, that'd be very helpful. I've never tested on Android and also have no knowledge about how to debug or render there. It should work similarly to other OpenGL ES platforms though.

Are all transitions behaving this way, or only this particular one?

@protyposis
Copy link
Author

It would be very helpful if you could provide the name of the preset you're displaying here!

Here are two example presets between which this issue happened (from the cream of the crop collection; issue doesn't seem related to presets, though):

Rozzor vs Esotic - Pixie Party Light (Party Down).milk
shifter - brain coral primaries.milk

If you can create a OpenGL API trace for a frame [...] I've never tested on Android and also have no knowledge

Haven't done this either, but I'm willing to try. Does this look like it could provide what you need?

Are all transitions behaving this way, or only this particular one?

Only the "plasma" transition.

@protyposis
Copy link
Author

The Android GPU Inspector linked above only supports selected phones. Nvidia provides its own toolkit for Android, "CodeWorks for Android" containing "Nsight Graphics 2019.3.0" with a frame debugger, but I can't get it to work with my Shield (getting stuck in "Injecting library..." step). The latest toolkit was released with Android 9, but the Shield was later updated to Android 11 - maybe they're incompatible, and toolkit support was dropped in the meantime. So, unfortunately, I'm out of ideas.

@kblaschke
Copy link
Member

kblaschke commented Mar 6, 2024

Sadly I can't really give any advice regarding Android development, that's completely outside of my current knowledge range. The only thing I could work with and at least tell what's going wrong there is some OpenGL API validation output.
There are different possibilities what causes this error, but the one I think is most probable is that the "plasma" transition shader can't be compiled and thus the draw call uses an invalid shader program, which will definitely cause undefined behavior, like the one seen in your video.

One thing you can try, if you have some way of getting STDOUT output (or using other means of Android-specific logging) out of libprojectM is that:

  • Add output or logging in this catch block here and log the return value of the exception's what() method
  • Recompile libprojectM and link it with your app
  • Run the app

If the shader compilation fails, you'll hopefully get some output with the error message. It might well be that Android's GLSL compiler doesn't understand some parts of the plasma shader (note this file isn't the full program, just the "main" function).

If you actually get some output, I can see if I'm able to replace the offending parts with a more compatible syntax.

The next projectM release will focus on developers integrating it, specifically we'll add a proper logging API for errors and other debug messages, plus other things helpful for debugging the library from the application's side. You should subscribe to issue #732 to get updates on that particular feature, once we start/finish implementing it.

@protyposis
Copy link
Author

Unfortunately, this doesn't help - there's no exception thrown here.

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

3 participants