{"action":"created","issue":{"url":"https://api.github.com/repos/vispy/vispy/issues/1052","labels_url":"https://api.github.com/repos/vispy/vispy/issues/1052/labels{/name}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/1052/comments","events_url":"https://api.github.com/repos/vispy/vispy/issues/1052/events","html_url":"https://github.com/vispy/vispy/issues/1052","id":101197792,"number":1052,"title":"Make Colormap shader efficient by using 1D Textures","user":{"login":"bollu","id":1694861,"avatar_url":"https://avatars.githubusercontent.com/u/1694861?v=3","gravatar_id":"","url":"https://api.github.com/users/bollu","html_url":"https://github.com/bollu","followers_url":"https://api.github.com/users/bollu/followers","following_url":"https://api.github.com/users/bollu/following{/other_user}","gists_url":"https://api.github.com/users/bollu/gists{/gist_id}","starred_url":"https://api.github.com/users/bollu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollu/subscriptions","organizations_url":"https://api.github.com/users/bollu/orgs","repos_url":"https://api.github.com/users/bollu/repos","events_url":"https://api.github.com/users/bollu/events{/privacy}","received_events_url":"https://api.github.com/users/bollu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/vispy/vispy/milestones/5","html_url":"https://github.com/vispy/vispy/milestones/version%200.5","labels_url":"https://api.github.com/repos/vispy/vispy/milestones/5/labels","id":1103110,"number":5,"title":"version 0.5","description":"","creator":{"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},"open_issues":37,"closed_issues":28,"state":"open","created_at":"2015-05-09T13:18:39Z","updated_at":"2015-08-19T12:19:04Z","due_on":"2015-09-30T07:00:00Z","closed_at":null},"comments":13,"created_at":"2015-08-15T18:35:22Z","updated_at":"2015-08-20T21:31:07Z","closed_at":null,"body":"As discussed in [this pull request thread](https://github.com/vispy/vispy/pull/1044), the current implementation of Colormaps generate a chain of `if-then-else` which is very expensive as the number of control points increases.\r\n\r\nIdeally, the colormap gradient is computed once, and is stored as a 1D texture which is used to map texture coordinates to the corresponding color for the `cmap.glsl_map` function that maps texcoords to colors."},"comment":{"url":"https://api.github.com/repos/vispy/vispy/issues/comments/133184795","html_url":"https://github.com/vispy/vispy/issues/1052#issuecomment-133184795","issue_url":"https://api.github.com/repos/vispy/vispy/issues/1052","id":133184795,"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},"created_at":"2015-08-20T21:31:07Z","updated_at":"2015-08-20T21:31:07Z","body":"What is the benefit to putting all colormaps into one texture? This makes the code more complex, especially for the case of user-defined and rapidly updating colormaps."}}