I read that you are planning to implement Deferred shading. But for what reason? Flash Player 11 doesn’t support multi render target so you will need to render whole scene like 4-5 times in order to fill G-buffers with specular, normals, diffuse, position etc. Of Course you can pack this data in less then 4 buffers (for example restore one of the normal vector components) but it will end up less flexible (what if you need to add extra data for some new shader technic?) and with worse quality(you can’t use hardware AA) But main concern is that for even simplest scene with only 1 light source you will still need all this 4 full geometry passes and at the same time most of cases will cover 3-5 light sources shader. You might be unable to implement some heavy technic for each of light sources (due to shader size limitation) but you actually can use it only for closest objects and lit everything else with something simple as Phong or even pure diffuse.
Maybe you planning to do some magic? Like rendering all 4 passes concurrently on different stage3ds then blending it all together? But im not shure if it is possible cuz stages might be isolated from each other, are they?
Also long time ago i saw interesting hack with OpenGL. There were two contexts. One was in a loop rendering scene, and through another resources was loaded, and then handler was passed to the rendering context. It was something like the background upload and it seems to be working.
Benefits from Deferred shadingSoftware: Away3D 4.x |
||
JAre, Newbie
Posted: 09 August 2012 02:34 PM Total Posts: 28 |
||
Richard Olsson, Administrator
Posted: 09 August 2012 04:26 PM Total Posts: 1192 [ # 1 ] The reason that we have experimented with a deferred rendering pipeline is that it enables some lighting and shading techniques that do not work in the standard pipeline. It’s working, but it’s not optimal for all use cases, which is why it would be offered as an option, not a requirement. The GPU data that has been created through one Context3D/Stage3D cannot be shared with another Context3D/Stage3D, so you are correct that what you are suggesting wouldn’t work. I’m not sure what your question is really, but I hope the above provides some relevant information for you. |
||
JAre, Newbie
Posted: 09 August 2012 04:55 PM Total Posts: 28 [ # 2 ] Yes thank you this is the answer for my question. When Deferred shading was just gaining popularity many enthusiastic developers became over-obsessed with it. And when i heard that you want to implement it with such specification limitations i wasn’t shure why. Away3D is professional engine and you shure do have your reasons. First i thought it will be general rendering strategy to extend flexibility of rendering pipeline and reduce impact of non-optimized content to the speed of rendering but I could not understand how it will work. |
||
JAre, Newbie
Posted: 09 August 2012 05:05 PM Total Posts: 28 [ # 3 ]
So it might be possible to implement some very heavy technic like this http://goo.gl/V979s (shader source http://goo.gl/3FyRJ) and slice huge shader in to deferred pases to overcome the limitation in source size and amount of Samplers? If-assignments culd be implemented with (seq,sge,slt,sne instructions) but It will be preaty have due to lack of branching and it’s really big piece of work. |