{"action":"created","issue":{"url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/4","repository_url":"https://api.github.com/repos/BrutPitt/glChAoS.P","labels_url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/4/comments","events_url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/4/events","html_url":"https://github.com/BrutPitt/glChAoS.P/issues/4","id":538423945,"node_id":"MDU6SXNzdWU1Mzg0MjM5NDU=","number":4,"title":"Proposal: Choosing the background color or export transparency","user":{"login":"Conclusio","id":10872142,"node_id":"MDQ6VXNlcjEwODcyMTQy","avatar_url":"https://avatars1.githubusercontent.com/u/10872142?v=4","gravatar_id":"","url":"https://api.github.com/users/Conclusio","html_url":"https://github.com/Conclusio","followers_url":"https://api.github.com/users/Conclusio/followers","following_url":"https://api.github.com/users/Conclusio/following{/other_user}","gists_url":"https://api.github.com/users/Conclusio/gists{/gist_id}","starred_url":"https://api.github.com/users/Conclusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Conclusio/subscriptions","organizations_url":"https://api.github.com/users/Conclusio/orgs","repos_url":"https://api.github.com/users/Conclusio/repos","events_url":"https://api.github.com/users/Conclusio/events{/privacy}","received_events_url":"https://api.github.com/users/Conclusio/received_events","type":"User","site_admin":false},"labels":[{"id":1161055398,"node_id":"MDU6TGFiZWwxMTYxMDU1Mzk4","url":"https://api.github.com/repos/BrutPitt/glChAoS.P/labels/enhancement","name":"enhancement","color":"a2eeef","default":true,"description":"New feature or request"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-12-16T13:49:28Z","updated_at":"2019-12-17T11:52:53Z","closed_at":null,"author_association":"NONE","body":"It would be useful to be able to choose the background color (e.g. white) for documents/publications.\r\nAlternatively, since the screenshot tool saves PNG files, one could use transparency information from the frame buffer."},"comment":{"url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/comments/566509578","html_url":"https://github.com/BrutPitt/glChAoS.P/issues/4#issuecomment-566509578","issue_url":"https://api.github.com/repos/BrutPitt/glChAoS.P/issues/4","id":566509578,"node_id":"MDEyOklzc3VlQ29tbWVudDU2NjUwOTU3OA==","user":{"login":"Conclusio","id":10872142,"node_id":"MDQ6VXNlcjEwODcyMTQy","avatar_url":"https://avatars1.githubusercontent.com/u/10872142?v=4","gravatar_id":"","url":"https://api.github.com/users/Conclusio","html_url":"https://github.com/Conclusio","followers_url":"https://api.github.com/users/Conclusio/followers","following_url":"https://api.github.com/users/Conclusio/following{/other_user}","gists_url":"https://api.github.com/users/Conclusio/gists{/gist_id}","starred_url":"https://api.github.com/users/Conclusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Conclusio/subscriptions","organizations_url":"https://api.github.com/users/Conclusio/orgs","repos_url":"https://api.github.com/users/Conclusio/repos","events_url":"https://api.github.com/users/Conclusio/events{/privacy}","received_events_url":"https://api.github.com/users/Conclusio/received_events","type":"User","site_admin":false},"created_at":"2019-12-17T11:52:52Z","updated_at":"2019-12-17T11:52:52Z","author_association":"NONE","body":"Thank you for the quick response!\r\n\r\nIndeed, I did not see the control to change the background color.\r\nBut you're right - every post-processing step has influence on the result, especially the \"display adjust\" section, which cannot be turned off. So choosing a background color would not immediately solve the issue. For example on your [homepage](https://www.michelemorrone.eu/glchaosp/RampeClass.html): It would be quite hard to match the background color of the resulting image to your used dark-blue background of #002033, since gamma, brightness, etc. influence the result.\r\n\r\nSo, the way to go would be to save the alpha information into the PNG file. Selecting a color for transparency is not the correct approach. E.g. black background and black shadows would be treated equally as transparent, although they should not. Also it would not allow for semi-transparency, but only act as a binary indicator, leading to really ugly borders, for example with glow.\r\n\r\nI did not look too much into your implementation, but since you're blending, I assume you have a framebuffer with RGBA components. Since you have post-processing shaders which basically remove the transparency information (e.g. the FXAA shader returns 1.0 as alpha component), you have two options:\r\n\r\n1. Save the framebuffer's alpha channel after blending is complete and before post-processing for a later PNG export\r\n2. Change all post-processing shaders to return the original texture's alpha value (e.g. for [FXAA](https://github.com/mattdesl/glsl-fxaa/blob/master/fxaa.glsl))\r\n\r\nPersonally, I would go with the first one. While saving the PNG file you can then use the currently displayed RGB color information as usual and add the alpha information from after the blending stage as the PNG's alpha channel.\r\n\r\nIf your PNG exporter does not support writing alpha channel values, you can save it as an extra grayscale file. It can easily be manually combined afterwards in e.g. Photoshop."}}
{"actor":{"display_login":"Conclusio"}}