down-res/pixelation filter?

Software: Away3D 4.x

Pierce, Jr. Member
Posted: 04 February 2015 01:09 AM   Total Posts: 40

  I’m interested in creating an effect similar to a scaled up video or bitmap. For example, if stage3d theoretically had a scale property independent of the actual width and height values, then scaling by a factor of 2 would result in each calculated pixel being displayed onscreen by a square of 4 pixels with identical color values.
  As I don’t expect there ever being any way to decouple the stage3d render target resolution and the actual display resolution, and writing to bitmaps isn’t at all practical for real-time, I am wondering how to go about this in post-processing.
  My assumption is that the most straightforward way to accomplish this would be to average regularly sampled groupings of rendered pixels with some potentially fancy blending maths based on the desired “resolution” of the final image.
  I also wonder if a more elegant solution for improved performance is feasible by rendering only a section of the stage3d actually matching the desired resolution and then copying those values to the correlating pixels across the full display. I’m thinking that by leveraging the conjunction of the off-center lens and the scissor-rectangle, and pulling the camera way out, the desired portion of the scene could be rendered to a only a corner of the full render target. Then by reading from the inside corner of the scissored area towards the corner of the stage3d, each rendered pixel can be written and blended to multiple pixels across the entire stage3d, writing from the opposite corner to the corner matching the scissor.
  This way the scene is rendered with only the necessary detail and number of fragments, and only a single render target can be used for the whole process. The primary caveat that comes to mind is that all mouse inputs would need to be appropriately translated before any picking occurs. The proposed method would also require a more direct intent to implement, as the stage and scene have to be specifically primed for it rather than just adding a filter.
  This is all just based on my very loose understanding of what’s actually happening on the gpu through agal. Implementing it is another thing entirely! (D:) To anyone more educated on the innards of the rendering process, any insight, advice, thoughts, code, etc. would be greatly appreciated!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X