{"action":"created","issue":{"url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1615","repository_url":"https://api.github.com/repos/Rajawali/Rajawali","labels_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1615/labels{/name}","comments_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1615/comments","events_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1615/events","html_url":"https://github.com/Rajawali/Rajawali/issues/1615","id":141486757,"number":1615,"title":"Post processing plus color picking","user":{"login":"jwoolston","id":2993125,"avatar_url":"https://avatars.githubusercontent.com/u/2993125?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoolston","html_url":"https://github.com/jwoolston","followers_url":"https://api.github.com/users/jwoolston/followers","following_url":"https://api.github.com/users/jwoolston/following{/other_user}","gists_url":"https://api.github.com/users/jwoolston/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoolston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoolston/subscriptions","organizations_url":"https://api.github.com/users/jwoolston/orgs","repos_url":"https://api.github.com/users/jwoolston/repos","events_url":"https://api.github.com/users/jwoolston/events{/privacy}","received_events_url":"https://api.github.com/users/jwoolston/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Rajawali/Rajawali/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"jwoolston","id":2993125,"avatar_url":"https://avatars.githubusercontent.com/u/2993125?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoolston","html_url":"https://github.com/jwoolston","followers_url":"https://api.github.com/users/jwoolston/followers","following_url":"https://api.github.com/users/jwoolston/following{/other_user}","gists_url":"https://api.github.com/users/jwoolston/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoolston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoolston/subscriptions","organizations_url":"https://api.github.com/users/jwoolston/orgs","repos_url":"https://api.github.com/users/jwoolston/repos","events_url":"https://api.github.com/users/jwoolston/events{/privacy}","received_events_url":"https://api.github.com/users/jwoolston/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Rajawali/Rajawali/milestones/2","html_url":"https://github.com/Rajawali/Rajawali/milestones/v1.1,%20Bombshell","labels_url":"https://api.github.com/repos/Rajawali/Rajawali/milestones/2/labels","id":322722,"number":2,"title":"v1.1, Bombshell","description":"Boring bug-fixes, crucial cleanup, and dull documentation. Primarily focused on out of memory issues.","creator":{"login":"jayschwa","id":475017,"avatar_url":"https://avatars.githubusercontent.com/u/475017?v=3","gravatar_id":"","url":"https://api.github.com/users/jayschwa","html_url":"https://github.com/jayschwa","followers_url":"https://api.github.com/users/jayschwa/followers","following_url":"https://api.github.com/users/jayschwa/following{/other_user}","gists_url":"https://api.github.com/users/jayschwa/gists{/gist_id}","starred_url":"https://api.github.com/users/jayschwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayschwa/subscriptions","organizations_url":"https://api.github.com/users/jayschwa/orgs","repos_url":"https://api.github.com/users/jayschwa/repos","events_url":"https://api.github.com/users/jayschwa/events{/privacy}","received_events_url":"https://api.github.com/users/jayschwa/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":62,"state":"open","created_at":"2013-04-29T01:51:56Z","updated_at":"2016-03-29T00:50:05Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2016-03-17T05:33:31Z","updated_at":"2016-03-29T00:53:30Z","closed_at":null,"body":"#### Rajawali Version or Branch\r\n`master`\r\n\r\n#### Device and Android Version (Please include the complete model number not just 'Galaxy S6', especially if its a Samsung)\r\nN/A\r\n\r\n#### Summary\r\nWhen applying post processing and color picking at the same time as demonstrated in the below snippet, color picking fails to work. Inspection of the color picking frame buffer shows that nothing appears to have been rendered due to some interaction with the post processing system.\r\n\r\n#### Steps to Reproduce (Sample code is helpful)\r\nCreate a scene with color picking and post processing. The example which demonstrated this is adding the greyscale post processing example code to the ObjectPicking example. In this case the render call is made on the post processing manager and does not pass through to super.onRender()). This lack of pass through could itself be part of the problem.\r\n\r\n````java\r\nprivate final class ObjectPickingRenderer extends AExampleRenderer implements OnObjectPickedListener {\r\n\r\n        private DirectionalLight  mLight;\r\n        private Object3D          mMonkey1;\r\n        private Object3D          mMonkey2;\r\n        private Object3D          mMonkey3;\r\n        private Object3D          mMonkey4;\r\n        private ObjectColorPicker mPicker;\r\n\r\n        private PostProcessingManager mEffects;\r\n\r\n        public ObjectPickingRenderer(Context context) {\r\n            super(context);\r\n        }\r\n\r\n        @Override\r\n        protected void initScene() {\r\n            try {\r\n                mPicker = new ObjectColorPicker(this);\r\n                mPicker.setOnObjectPickedListener(this);\r\n                mLight = new DirectionalLight(-1, 0, 1);\r\n                mLight.setPosition(0, 0, -4);\r\n                mLight.setPower(1.5f);\r\n                getCurrentScene().addLight(mLight);\r\n                getCurrentCamera().setPosition(0, 0, 7);\r\n\r\n                Material material = new Material();\r\n                material.enableLighting(true);\r\n                material.setDiffuseMethod(new DiffuseMethod.Lambert());\r\n\r\n                final LoaderAWD parser = new LoaderAWD(mContext.getResources(), mTextureManager, R.raw.awd_suzanne);\r\n                parser.parse();\r\n\r\n                mMonkey1 = parser.getParsedObject();\r\n\r\n                mMonkey1.setScale(.7f);\r\n                mMonkey1.setPosition(-1, 1, 0);\r\n                mMonkey1.setRotY(0);\r\n                mMonkey1.setMaterial(material);\r\n                mMonkey1.setColor(0x0000ff);\r\n                getCurrentScene().addChild(mMonkey1);\r\n\r\n                mMonkey2 = mMonkey1.clone();\r\n                mMonkey2.setScale(.7f);\r\n                mMonkey2.setPosition(1, 1, 0);\r\n                mMonkey2.setRotY(45);\r\n                mMonkey2.setMaterial(material);\r\n                mMonkey2.setColor(0x00ff00);\r\n                getCurrentScene().addChild(mMonkey2);\r\n\r\n                mMonkey3 = mMonkey1.clone();\r\n                mMonkey3.setScale(.7f);\r\n                mMonkey3.setPosition(-1, -1, 0);\r\n                mMonkey3.setRotY(90);\r\n                mMonkey3.setMaterial(material);\r\n                mMonkey3.setColor(0xcc1100);\r\n                getCurrentScene().addChild(mMonkey3);\r\n\r\n                mMonkey4 = mMonkey1.clone();\r\n                mMonkey4.setScale(.7f);\r\n                mMonkey4.setPosition(1, -1, 0);\r\n                mMonkey4.setRotY(135);\r\n                mMonkey4.setMaterial(material);\r\n                mMonkey4.setColor(0xff9955);\r\n                getCurrentScene().addChild(mMonkey4);\r\n\r\n                mPicker.registerObject(mMonkey1);\r\n                mPicker.registerObject(mMonkey2);\r\n                mPicker.registerObject(mMonkey3);\r\n                mPicker.registerObject(mMonkey4);\r\n\r\n                //\r\n                // -- Create a post processing manager. We can add multiple passes to this.\r\n                //\r\n\r\n                mEffects = new PostProcessingManager(this);\r\n\r\n                //\r\n                // -- A render pass renders the current scene to a texture. This texture will\r\n                //    be used for post processing\r\n                //\r\n\r\n                RenderPass renderPass = new RenderPass(getCurrentScene(), getCurrentCamera(), 0);\r\n                mEffects.addPass(renderPass);\r\n\r\n                //\r\n                // -- Add a Greyscale effect\r\n                //\r\n\r\n                EffectPass greyScalePass = new GreyScalePass();\r\n                greyScalePass.setRenderToScreen(true);\r\n                mEffects.addPass(greyScalePass);\r\n            } catch (Exception e) {\r\n                e.printStackTrace();\r\n            }\r\n        }\r\n\r\n        @Override\r\n        protected void onRender(long ellapsedRealtime, double deltaTime) {\r\n            //\r\n            // -- Important. Call render() on the post processing manager.\r\n            //\r\n            mEffects.render(ellapsedRealtime, deltaTime);\r\n            mMonkey1.setRotY(mMonkey1.getRotY() - 1f);\r\n            mMonkey2.setRotY(mMonkey2.getRotY() + 1f);\r\n            mMonkey3.setRotY(mMonkey3.getRotY() - 1f);\r\n            mMonkey4.setRotY(mMonkey4.getRotY() + 1f);\r\n            //super.onRender(ellapsedRealtime, deltaTime);\r\n        }\r\n\r\n        public void getObjectAt(float x, float y) {\r\n            mPicker.getObjectAt(x, y);\r\n        }\r\n\r\n        public void onObjectPicked(Object3D object) {\r\n            object.setZ(object.getZ() == 0 ? -2 : 0);\r\n        }\r\n\r\n    }\r\n````"},"comment":{"url":"https://api.github.com/repos/Rajawali/Rajawali/issues/comments/202648383","html_url":"https://github.com/Rajawali/Rajawali/issues/1615#issuecomment-202648383","issue_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1615","id":202648383,"user":{"login":"rpicolet","id":616858,"avatar_url":"https://avatars.githubusercontent.com/u/616858?v=3","gravatar_id":"","url":"https://api.github.com/users/rpicolet","html_url":"https://github.com/rpicolet","followers_url":"https://api.github.com/users/rpicolet/followers","following_url":"https://api.github.com/users/rpicolet/following{/other_user}","gists_url":"https://api.github.com/users/rpicolet/gists{/gist_id}","starred_url":"https://api.github.com/users/rpicolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpicolet/subscriptions","organizations_url":"https://api.github.com/users/rpicolet/orgs","repos_url":"https://api.github.com/users/rpicolet/repos","events_url":"https://api.github.com/users/rpicolet/events{/privacy}","received_events_url":"https://api.github.com/users/rpicolet/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T00:53:30Z","updated_at":"2016-03-29T00:53:30Z","body":"> to keep me thinking about new things...\r\n\r\nLike you don't get enough opportunities... :wink: \r\n\r\n>Get yourself a well deserved beer sir! \r\n\r\nWhat a delightful idea; think I'll do just that."}}