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

[Feature Request] 8192 and 16384 texture dimension support #196

Open
itlancer opened this issue Jan 4, 2020 · 12 comments
Open

[Feature Request] 8192 and 16384 texture dimension support #196

itlancer opened this issue Jan 4, 2020 · 12 comments

Comments

@itlancer
Copy link

itlancer commented Jan 4, 2020

Feature Description

8192 and 16384 pixels texture dimension support necessary for modern solutions. In some cases it very useful: large texture maps or content for panoramas.
DirectX 10 and 11 support it: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx

Earlier 8K textures support for Windows 8.1+ 64-bit and macOS was introduced with Context3D::supports8kTexture with AIR 29 BETA
(https://community.adobe.com/t5/flash-player/2-7-2018-beta-air-29-0-0-96/td-p/9719043). But it was dropped just after that with newer AIR releases.

Tracker link: https://tracker.adobe.com/#/view/AIR-3824255
Related issue (not the same): #89

Known Workarounds

none

@xabip
Copy link

xabip commented Sep 15, 2020

Hi,

Are there any news on this one? I'm not sure if this is difficult to implement but it would be really interesting to allow bigger dimensions.
We're using 360º videos in a cube format and the quality is quite poor with the current 4k texture size limit.

Thanks!

@ajwfrost
Copy link
Collaborator

Hi - I'm wondering whether this is already done... I do recall we looked at it, it may have been changed as part of:
AIR 33.1.0.43
AIR-310: Remove Stage3D resource limits for apps using namespace 33.1

Just looking at the notes in our 'AIR-310' issue:
enable this for AGAL3 (i.e. Standard Extended and above profile) and only for content built with AIR 33 i.e. 33.1 = SWF 44

So are you able to check please, if you have Standard Extended profile and use a recent SDK, will it allow you to create 8k textures?

thanks

@itlancer
Copy link
Author

@ajwfrost
No, with latest AIR 33.1.1.259 we cannot create textures bigger than 4K (4096 per side).
Checked with Windows 10 x64 device with DirectX 12 and macOS 10.15.6 with Apple MacBook Pro 16,1 with Context3DProfile.STANDARD_EXTENDED profile with 32-bit and 64-bit bundle application.
var texture:Texture = context3D.createTexture(8192, 8192, Context3DTextureFormat.BGRA, false);
cause ArgumentError: Error #3683: Texture too big (max is 4096x4096).

var texture:CubeTexture = context3D.createCubeTexture(2048, Context3DTextureFormat.BGRA, false);
cause ArgumentError: Error #3705: Cubemap texture too big (max is 1024x1024).

var texture:RectangleTexture = context3D.createRectangleTexture(8192, 8192, Context3DTextureFormat.BGRA, false);
cause ArgumentError: Error #3766: RectangleTexture too big (max is the larger of 4096x4096 or the size of the backbuffer).

Trying to playback 5K+ MP4.H.264 (even without audio) video also caused
NetStream.Play.Failed error event
Related issue : #89

Trying to playback 5K+ FLV H.263 works but with unacceptable lags. In Scout you can see extreme time consumptions by "Other Overhead" by every frame.

Application example with sources attached.
texture_8k.zip

@xabip
There are also issues with videos more than 4K resolution: #89
And video playback at all with AIR 33 for Windows and macOS: #80
And video with high profiles playback: #139

@htmiel
Copy link

htmiel commented Oct 28, 2020

Indeed, 8192 (and larger) texture support would be a very useful addition.

@denisgl7
Copy link

denisgl7 commented Apr 4, 2021

Is it possible to remove the restrictions on creating large textures on mobile phones? Does it make sense to discuss this in a separate topic?

@xabip
Copy link

xabip commented May 13, 2021

Hi @ajwfrost,

I've tested again with the latest version (33.476) and the textures or videos (#89) bigger than 4k are still not working. Is this something feasible to have in the near future? At least for the desktop builds?

Thanks!

@ajwfrost
Copy link
Collaborator

Hi - I've just had a quick look at this and there is a feature flag around the code for 8k texture support; it looks like Adobe had some experimental code in there to do asynchronous or multithreaded texture uploads on 64-bit Windows when it got to those sorts of levels.. so we could look at enabling that and doing a test build for you. Just allowing an 8k texture (updating the internal limit) causes problems though, so this isn't just a trivial change I'm afraid..

@xabip
Copy link

xabip commented May 14, 2021

Hi,

It would be amazing to get that test build. It would only be for 64-bit Windows right?, not Mac.

Thanks!

@ajwfrost
Copy link
Collaborator

The feature flag would enable a larger limit for all platforms although the special handling of this was only on Windows... not sure whether it would "just work" on mac, but on Windows with this feature flag, the above test case is throwing a com exception within DirectX. So, there is still some work to do here...

@ajwfrost
Copy link
Collaborator

Okay so the reason for the error is that the graphics card doesn't have that much video memory. And according to the Direct3D specs, they don't have to .. 4k x 8k might work but that's about the limit. (for any one object/allocation = 128MB).

So it may be possible to do this by having 4 paned 4k-x-4k textures. Not sure whether there's much benefit in us doing this at the C++ level or whether it would be something that can be done via an abstraction in ActionScript..?

@xabip
Copy link

xabip commented May 18, 2021

That makes sense. I've tested having 4x4k textures & 4x4k videos at the same time on the screen and it has worked fine. It's a bit odd since I remember having issues playing more than 2 videos at the same time (some time ago) which seems to not be a problem anymore.
As you said, we can use this as a workaround, however it would certainly be better to have a native solution!

Thanks for you time @ajwfrost.

@htmiel
Copy link

htmiel commented May 18, 2021

8k textures would be a great benefit for games (using Starling) which use lots of sprites, since more sprites could be included in a single texture and in turn this would reduce the number of draw calls. This would help to increase performance and reduce battery usage and device heating for GPU intensive games.

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

6 participants