{"action":"created","issue":{"url":"https://api.github.com/repos/vispy/vispy/issues/868","labels_url":"https://api.github.com/repos/vispy/vispy/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/868/comments","events_url":"https://api.github.com/repos/vispy/vispy/issues/868/events","html_url":"https://github.com/vispy/vispy/pull/868","id":67029372,"number":868,"title":"Perspective correction","user":{"login":"campagnola","id":940580,"avatar_url":"https://avatars.githubusercontent.com/u/940580?v=3","gravatar_id":"","url":"https://api.github.com/users/campagnola","html_url":"https://github.com/campagnola","followers_url":"https://api.github.com/users/campagnola/followers","following_url":"https://api.github.com/users/campagnola/following{/other_user}","gists_url":"https://api.github.com/users/campagnola/gists{/gist_id}","starred_url":"https://api.github.com/users/campagnola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/campagnola/subscriptions","organizations_url":"https://api.github.com/users/campagnola/orgs","repos_url":"https://api.github.com/users/campagnola/repos","events_url":"https://api.github.com/users/campagnola/events{/privacy}","received_events_url":"https://api.github.com/users/campagnola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-08T01:57:08Z","updated_at":"2015-04-08T03:34:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vispy/vispy/pulls/868","html_url":"https://github.com/vispy/vispy/pull/868","diff_url":"https://github.com/vispy/vispy/pull/868.diff","patch_url":"https://github.com/vispy/vispy/pull/868.patch"},"body":"This fixes perspective transforms. Summary:\r\n\r\n* OpenGL uses homogeneous coordinates; our transforms need to do the same.\r\n* Corrected STTransform to work correctly when w != 1\r\n* PerspectiveTransform is now just a thin wrapper around AffineTransform. Might just combine these both into MatrixTransform in a future PR.\r\n* Fixed ImageVisual to work correctly in impostor mode when its transforms affect z\r\n* Added a script that I used to test perspective. This will be converted into a unit test with image comparison in a future PR.\r\n* There is a bizarre bug on my machine that I suspect is an OpenGL bug. The console example gives me a warning:\r\n\r\n```\r\nINFO: Variable u_scale is not an active uniform\r\n```\r\n\r\nThis is due to the STTransform map function, which now looks like:\r\n\r\n```\r\n        vec4 st_transform_map(vec4 pos) {\r\n            return vec4(pos.xyz * $scale.xyz + $translate.xyz * pos.w, pos.w);\r\n        }\r\n```\r\n\r\nIf I switch back to the old implementation, the warning goes away:\r\n\r\n```\r\n        vec4 st_transform_map(vec4 pos) {\r\n            return (pos * $scale) + $translate * pos.w;\r\n        }\r\n```\r\n\r\nI can't see why the $scale uniform would be optimized out of the shader in either case. I'm betting Travis won't have the same error, though.."},"comment":{"url":"https://api.github.com/repos/vispy/vispy/issues/comments/90794184","html_url":"https://github.com/vispy/vispy/pull/868#issuecomment-90794184","issue_url":"https://api.github.com/repos/vispy/vispy/issues/868","id":90794184,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T03:34:41Z","updated_at":"2015-04-08T03:34:41Z","body":"\n[![Coverage Status](https://coveralls.io/builds/2287231/badge)](https://coveralls.io/builds/2287231)\n\nCoverage decreased (-0.93%) to 68.97% when pulling **c605a3cd5b92f0b6b62daa5e8c0d1f002e469677 on campagnola:perspective** into **383fb73d1a97e640b365af9a2991f9594b73ab11 on vispy:master**.\n"}}