Saturday, August 6, 2016

[APP][S3D][OPENGLES][2.3+]Proof Of Concept HW accelerated S3d

Requires root access. so it can set the 3d mode to landscape or portrait as you rotate the phone.
Runs in liquidsmooth CM11, not tested on anything else yet.

Just a proof of concept and getting the source code out there for you developers (especially like @HJ200) who might be interested.
While I was, um, examining, the ICS stock rom a little more thoroughly than encouraged, I noticed that part of the StereoSurfaceView seemed to run on GL calls.
Lots of research later, quite some time ago actually, I found information relating to the column interlacing, but my GL savvy was nonexistent and I just couldn't choke it down yet.
Recently upon going back at it again, I found the suggestion of using a fragment shader instead of a stencil buffer, and chased that to Cinder forums and from there to github

So I dived in to the OpenGLES 2.0 again. Piddled through a bunch of different samples before settling on this tutorial as a base.
Modified it, included a tweaked version of the vertical interlaced shader from CInder remade for horizontal interlace, dumped in a couple of stereo png files to examine it, and tweaked, tweaked, tweaked, until I finally have half a clue how it works.
The magic, what I would consider hardware acceleration, is in the fragment shader. sp_Image.
If someone really knows what they're doing they can run with this.
I'll keep working on it myself, but wanted to share the novelty. And of course the source code.
Greedy manufacturers don't share code, but most all the indie devs do.
Attached, the demo app. The current image it's set to show is ATP-synthase, but the cat from the HTCDev sample 3d code is in the res folder too if you want to change it before building.

Builds fine with AIDE but eclipse doesn't seem to like it.
Source!

Attached Thumbnails
Click image for larger version Name: qo1_stereo.jpg Views: N/A Size: 75.7 KB ID: 3835317  
Attached Files
File Type: apk sview.apk - [Click for QR Code] (1.33 MB)


from xda-developers http://ift.tt/2aPWJ0M
via IFTTT

No comments:

Post a Comment