-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Black get_texture() from viewport on desktop, works fine on mobile. #93422
Comments
Tested on latest master [04bf7d4] and i can confirm the issue, also the forward and mobile rendering mode shows a different behaviour with HDR and get_viewport().get_texture().get_image().save_png() In editor and playing the scene the image is rendered normally, like the no hdr image, but saving the viewport texture show the results in the image above. I bisected the issue and found a culprit for the compatibility issue and another for the forward/mobile Compatibility culprit: #87360 Forward/mobile culprit: #80215 |
@matheusmdx Great work! The output of the Forward+ and Mobile renderers are what is expected with the HDR2D mode enabled as the image is stored in an HDR format in linear space, instead of in an LDR format in sRGB space. #92496 documents this requirement and adds a helpful For the compatibility renderer it seems like it is copying from the wrong texture when doing the screen copy. We will likely need to add some logic to the function that copies the screen texture to ensure that it is copying from the correct texture |
@matheusmdx thanks you for introducing me to the Also @clayjohn is HDR feature available in compatibility ? |
I don't know where this adjust needs to be done so feel free to take a look |
Tested versions
System information
Pop!_OS 22.04 LTS - X11 - GLES3 (Compatibility)
Issue description
This code (based on the sample in the docs) successfully produces screenshots on Android mobile:
This works fine on Android:

But on Desktop:

This was also present on Windows 11, but am now on PopOS.
This seems to be caused by enabling Use HDR 2D, but it is unclear why it behaves differently for desktop.
Steps to reproduce
See description.
Minimal reproduction project (MRP)
Will make one if required.
The text was updated successfully, but these errors were encountered: