{"action":"created","issue":{"url":"https://api.github.com/repos/sp614x/optifine/issues/195","repository_url":"https://api.github.com/repos/sp614x/optifine","labels_url":"https://api.github.com/repos/sp614x/optifine/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/sp614x/optifine/issues/195/comments","events_url":"https://api.github.com/repos/sp614x/optifine/issues/195/events","html_url":"https://github.com/sp614x/optifine/issues/195","id":162319014,"number":195,"title":"(Shaders) More control over gbuffer transparency handling","user":{"login":"BruceKnowsHow","id":17636733,"avatar_url":"https://avatars.githubusercontent.com/u/17636733?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceKnowsHow","html_url":"https://github.com/BruceKnowsHow","followers_url":"https://api.github.com/users/BruceKnowsHow/followers","following_url":"https://api.github.com/users/BruceKnowsHow/following{/other_user}","gists_url":"https://api.github.com/users/BruceKnowsHow/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceKnowsHow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceKnowsHow/subscriptions","organizations_url":"https://api.github.com/users/BruceKnowsHow/orgs","repos_url":"https://api.github.com/users/BruceKnowsHow/repos","events_url":"https://api.github.com/users/BruceKnowsHow/events{/privacy}","received_events_url":"https://api.github.com/users/BruceKnowsHow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sp614x/optifine/labels/shaders","name":"shaders","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-26T08:57:25Z","updated_at":"2016-07-16T17:50:21Z","closed_at":null,"body":"I'm trying to implement a double-layered deferred rendering solution to handle semi-opaque surfaces. I've come up with a couple of things that would improve my pipeline:\r\n\r\n1: Disable alpha based fragment culling for opaque gbuffers. I would like to use the alpha channel of opaque gbuffers to store information, however if the channel falls below about 0.1, the fragment is discarded. This functionality can be imitated (and already is in my shaderpack) by just having this type of line somewhere in your opaque gbuffers:\r\n\r\n`if (diffuse.a < 0.1000003) discard;`\r\n\r\n2: Make alpha based fragment blending optional per-buffer for semi-transparent gbuffers. Similar to request 1, I would like to store information in the alpha channel of my buffer, but if it's dictating the mix amount of the RGB components, it's unusable. I would like to use RGB blending with some of my gbuffers, but not others. A shaderpack constant would do the job perfectly.\r\n\r\nRequests 1 and 2 can be fulfilled in a roundabout way quite simply: Make gbuffer alpha blending/culling optional per-buffer, using shaderpack constants. For example:\r\n\r\n`const bool FragData0Blending = true; // default behavior, only active in gbuffers`\r\n`const bool FragData3Blending = false; // opaques will not cull, semi-opaques will not blend`\r\n\r\nThis should maintain compatibility with other shaderpacks.\r\n\r\n3: Alpha channel blending for semi-transparent gbuffers. I asked for this ([in addition to a redundant feature](https://github.com/sp614x/optifine/issues/127)) in the past. I do not know if it is possible in OpenGL, but it would be extremely ideal, because it would save me a whole buffer dedicated to just recovering the accumulated alpha of semi-transparent surfaces (as I currently do, and as is described in my conclusion to the linked issue)."},"comment":{"url":"https://api.github.com/repos/sp614x/optifine/issues/comments/233142478","html_url":"https://github.com/sp614x/optifine/issues/195#issuecomment-233142478","issue_url":"https://api.github.com/repos/sp614x/optifine/issues/195","id":233142478,"user":{"login":"dotModded","id":7399292,"avatar_url":"https://avatars.githubusercontent.com/u/7399292?v=3","gravatar_id":"","url":"https://api.github.com/users/dotModded","html_url":"https://github.com/dotModded","followers_url":"https://api.github.com/users/dotModded/followers","following_url":"https://api.github.com/users/dotModded/following{/other_user}","gists_url":"https://api.github.com/users/dotModded/gists{/gist_id}","starred_url":"https://api.github.com/users/dotModded/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotModded/subscriptions","organizations_url":"https://api.github.com/users/dotModded/orgs","repos_url":"https://api.github.com/users/dotModded/repos","events_url":"https://api.github.com/users/dotModded/events{/privacy}","received_events_url":"https://api.github.com/users/dotModded/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T17:50:21Z","updated_at":"2016-07-16T17:50:21Z","body":"Bump"}}
{"actor":{"display_login":"dotModded"}}