{"action":"created","issue":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3488","labels_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3488/labels{/name}","comments_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3488/comments","events_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3488/events","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3488","id":110525973,"number":3488,"title":"GLSL preprocessor includes","user":{"login":"fluffyfreak","id":825083,"avatar_url":"https://avatars.githubusercontent.com/u/825083?v=3","gravatar_id":"","url":"https://api.github.com/users/fluffyfreak","html_url":"https://github.com/fluffyfreak","followers_url":"https://api.github.com/users/fluffyfreak/followers","following_url":"https://api.github.com/users/fluffyfreak/following{/other_user}","gists_url":"https://api.github.com/users/fluffyfreak/gists{/gist_id}","starred_url":"https://api.github.com/users/fluffyfreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluffyfreak/subscriptions","organizations_url":"https://api.github.com/users/fluffyfreak/orgs","repos_url":"https://api.github.com/users/fluffyfreak/repos","events_url":"https://api.github.com/users/fluffyfreak/events{/privacy}","received_events_url":"https://api.github.com/users/fluffyfreak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-08T19:34:44Z","updated_at":"2015-10-08T19:47:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/pulls/3488","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3488","diff_url":"https://github.com/pioneerspacesim/pioneer/pull/3488.diff","patch_url":"https://github.com/pioneerspacesim/pioneer/pull/3488.patch"},"body":"# Description:\r\nThis is a primitive, slightly hacky even, `#include` preprocessor for the shader files.\r\nCurrently when building a shader we add the other included glsl files for attirbutes, logz and library methods in hardcoded calls even for shaders that will not use them.\r\n\r\nIn future therefore when we add GPU noise shaders and their support functions everything would include those as well.\r\n\r\nSupporting a simple `#include` macro means that each shader can include only what the shaders author wants including.\r\n\r\n# This PR:\r\nI have added the necessary `#include` to each file, probably unnecessary ones too as I just copied and pasted the three usual suspects into each file.\r\n\r\nI've been a little lazy with the filename construction and used an `sprintf` which I should probably tidy up but it's late and I couldn't think straight about doing it with Pioneers string stuff.\r\n\r\nComments welcome as always.\r\n\r\nAndy"},"comment":{"url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/comments/146667177","html_url":"https://github.com/pioneerspacesim/pioneer/pull/3488#issuecomment-146667177","issue_url":"https://api.github.com/repos/pioneerspacesim/pioneer/issues/3488","id":146667177,"user":{"login":"impaktor","id":619390,"avatar_url":"https://avatars.githubusercontent.com/u/619390?v=3","gravatar_id":"","url":"https://api.github.com/users/impaktor","html_url":"https://github.com/impaktor","followers_url":"https://api.github.com/users/impaktor/followers","following_url":"https://api.github.com/users/impaktor/following{/other_user}","gists_url":"https://api.github.com/users/impaktor/gists{/gist_id}","starred_url":"https://api.github.com/users/impaktor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impaktor/subscriptions","organizations_url":"https://api.github.com/users/impaktor/orgs","repos_url":"https://api.github.com/users/impaktor/repos","events_url":"https://api.github.com/users/impaktor/events{/privacy}","received_events_url":"https://api.github.com/users/impaktor/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T19:47:12Z","updated_at":"2015-10-08T19:47:12Z","body":"> Comments welcome as always.\r\n\r\nI wish I had something to say, other than \"I need to learn shaders\"."}}