Can we push Shader Model 5 rendering quality to mobile device?

Hi,

I’m not sure where to post this but since it’s related to rendering, I’m just wondering, with Vulkan and Metal API available, is it possible to push SM5 rendering quality to latest mobile device? What I mean latest are really iPhone X, Samsung Galaxy S9, Oppo Find X, etc.

If not, can someone elaborate the comparison in detail (hardware level of detail, is it lacking of texture samples? memory? etc., not just saying because mobile is slower)?

Anyway I’m not asking how to do this, but just wondering what are the latest limitations that keeps even the most high-end mobile to date to be promoted up from “mobile” features to “desktop” features.

Cheers.

1 Like

iOS already have Desktop Forward Renderer. Do you need deferred one? There was one at some point but it seems to be removed.
Biggest limiting factor is bandwith. Deferred rendered need lot of framebuffers which make it quite impractical on power limited devices.

Deferred needs a baseline bandwidth that very few mobile devices get close to nowadays. The Nintendo Switch is the only mobile hardware I know that can pull it of at 30+ FPS, probably the iPad Pro too. It will take some more time until that level of performance becomes widely available.

The thing is UE4 set forward renderer as experimental, and deferred renderer is default (for anything even ES 2), as if they’re about to remove it someday. I also probably need more than 1 light. One of the reason why I want SM5 quality is dynamic shadows from point lights, just 1 of it is enough. It’s not available on ES 3.1 features. I think forward renderer suffers for more lights, isn’t it? So is mobile, though.

So I assume so far we still need a couple more years due to bandwidth hmm… Snapdragon 845 is the closest thing to this Switch’s Tegra X1 (equal or a bit faster), though it is attached to the current fastest phone, ASUS ROG phone but even that with some extra accessories to cool it from throttling, I think.

ES2.0 and ES3.1 are pure forward renderers.

Oh didn’t know that! can you point to any doc cause I can’t seem to find it. Is it the Forward Shading in Project Settings > Renderer? Cause the Forward Shading (Renderer?) is ticked off by default so I assume it uses deferred shading (Renderer…?) by default. https://docs.unrealengine.com/en-us/…orwardRenderer

Any effect that relies on loading a render target as a texture tends to be prohibitively expensive on mobile due to massive pipeline stalls in the tile-based deferred architecture (deferred referring to the fact that it renders nothing until all triangles have been submitted and sorted, not lighting). Those chips are highly optimized to render the screen start to finish in one pass on a per-tile basis, then effectively discarding the result.

Does this apply to the latest flagship? I mean as I’ve mentioned, devices like iPhone X, Samsung Galaxy S9, Oppo Find X, ASUS ROG phone, etc. I can’t really find the hardware details of them to check whether or not their GPU memory is still so tight to perform an immediate mode deferred rendering.

You can see from the mobile pixel shader that it’s fully forward. https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Shaders/Private/MobileBasePassPixelShader.usf
All Apple devices use Tile-based deferred renderer. Which is not related to forward/deferred renderers in game engines. Details can be found here. A look at the PowerVR graphics architecture: Tile-based rendering - Imagination

Thanks for the trouble Kalle! It’s helpful for me to realize this.

So… I guess I can conclude that if the chip is always designed this way (as Owen said), we’re stuck with this mobile rendering then until IMR is possible on mobile (which is unlikely…)?
Seems like that guy in the article doesn’t intend to make it better either (in terms of power), considering he is on the TBDR side of the fight, looking how he despise the inefficiency regarding to bandwidth (according to him) of geforce or radeon. :confused:

But I understand, desktop is works more on power and mobile is more about efficiency. Tough choice. Oh well so I guess I got my answer. Thanks guys and for the links.

There’s a possibility of deferred rendering becoming viable on tile-based mobile GPUs in the future. Last year Vulkan introduced support for Multipass (details here: https://www.khronos.org/assets/uploads/developers/library/2017-gdc/GDC_Vulkan-on-Mobile_Vulkan-Multipass-ARM_Mar17.pdf). The idea is to tell the GPU about all passes that are going to make the frame so it can avoid having to write out intermediate results to the framebuffer and then re-load them as a textures, drawing all passes on the tile buffer one after another re-using the data from the tile buffer directly and then writing out the result to the final frame buffer.

It depends on each manufacturers’ Android GPU drivers implementing it correctly, which might take a while to become widespread enough (Vulkan support itself is still hit-and-miss). I don’t know much about Metal and Metal 2, so I don’t know if they have something like that on iOS.

That is a workaround in some cases, and you can do it in OpenGL ES now, by turning your deferred passes into translucent fullscreen quads in depth order. This can work because of the fact that TBDR sorts every triangle and guarantees consistent shader execution order, allowing you to access the backbuffer from the previous draw call without a pipeline stall. However, this only works if you read from the exact same pixel that you are writing to. Any blurring or distortion or offset sampling will not work unless you finish rendering the whole frame and copy it back from memory in a new render pass.

But even so, it isn’t necessarily efficient enough to do sophisticated deferred lighting. And you can’t interleave other rendering between passes (you are stuck with one set of bound render targets and you can’t clear depth in the middle), like for shadow buffer rendering. Simpler post processing can actually be more efficient than on PC because of this, however, as long as you don’t need to take multiple/offset samples thanks to not needing to wait for the whole frame to finish.

If you are using Shader Model 5 Materials which is setup by default using the Unreal Editor… and let’s say you work on some look development.
How the heck can you make sure that you get the same kinda look when compiling to ES 3.1?

I also noticed… it seems… that light values are different.
Meaning… eve if you don’t use a PostProcess Volume and you use a rect light source with a value of 1.

The intensity is much stronger when using Shader Model 5 compared to ES 3.1

That’s also a major difference… especially to consider when setting up the lighting.

But if you would like to get best results for both world - how the heck do you usually approach that?

thanks for any advice, hints and thoughts.
appreciate it!