Can OpenFL ES 2.0 be delayed rendering / shading?

Has anyone implemented deferred rendering / shading in OpenGL ES 2.0? It does not support MRT, so with just one color buffer, this is not something that can be implemented in the β€œnormal” way.

In particular, I study iPad, iPhone4 (iPhone 3gs maaaybe) and Android. The GLESView app on the iPad / iPhone4 / iPhone3gs has the GL_OES_RGB8_RGBA8 extension, and I haven’t looked too deep yet, but with 8 bit / channel this idea is interesting: http://www.gamedev.net/topic/562138-opengl-es-20 -and-deferred-shading /

Any other ideas? Is it even worth it in terms of performance?

+6
source share
1 answer

although the GL_ARB_draw_buffers extension is available on some Android devices (and therefore it is possible to provide several buffers), the answer is " No " (perhaps with the exception of some "me draw 50 milion" polygons "associated with scripts related to the rasterizer).

This is because the GPUs used on these devices have very weak pixel shaders, and therefore, making a full-screen pass using some complex shaders is almost out of the question. You better stick to the demo tricks of the old days that were used before the programmed shading became the main one.

Regardless of what you can move vertices into shaders, do it (for example, effects like full-screen deformations are better using a deformed mesh in the vertex shader rather than texcoords offset in the fragment shader).

Regardless of what you can solve using geometry (for example, rendering a skybox made from the actual block will be faster than rendering a full-screen ATV and calculating the viewing directions for selecting textures in the shader) do it.

Well, the only thing we can do is hope that new devices with stronger pixel shaders become available. I hope this is not a very depressing answer :) Of course, you can try to implement deferred shading on Android, but it will probably be slow.

+2
source

Source: https://habr.com/ru/post/893954/


All Articles