{"comment":{"url":"https://api.github.com/repos/supertuxkart/stk-code/comments/19445710","html_url":"https://github.com/supertuxkart/stk-code/commit/23a1b08efe1a8e29e8874da2f1db4b904b7f860c#commitcomment-19445710","id":19445710,"user":{"login":"deveee","id":5108558,"avatar_url":"https://avatars.githubusercontent.com/u/5108558?v=3","gravatar_id":"","url":"https://api.github.com/users/deveee","html_url":"https://github.com/deveee","followers_url":"https://api.github.com/users/deveee/followers","following_url":"https://api.github.com/users/deveee/following{/other_user}","gists_url":"https://api.github.com/users/deveee/gists{/gist_id}","starred_url":"https://api.github.com/users/deveee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deveee/subscriptions","organizations_url":"https://api.github.com/users/deveee/orgs","repos_url":"https://api.github.com/users/deveee/repos","events_url":"https://api.github.com/users/deveee/events{/privacy}","received_events_url":"https://api.github.com/users/deveee/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"23a1b08efe1a8e29e8874da2f1db4b904b7f860c","created_at":"2016-10-16T21:41:42Z","updated_at":"2016-10-16T21:41:42Z","body":"I had a quick look at this. Here is what I noticed:\r\n\r\nIn renderTransparent() function alpha blending is enabled for ghost kart, but glBlendFunc is not defined. It still works because it is already defined in few different places, but I think that we should define something (eg. glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA) ?) after glEnable(GL_BLEND) to make it clear.\r\n\r\nA Puffy kart doesn't look good. The glasses were already transparent and it looks that they are not affected by this shader.\r\n\r\nI'm also not 100% sure what about\r\n```\r\n#ifdef Use_Bindless_Texture\r\n    Color.xyz = pow(Color.xyz, vec3(2.2));\r\n#endif\r\n```\r\nIt is used as a workaround when sRGB is not working for ATI graphics cards. Basically color^(2.2) gives similar result to rendering with sRGB support. I think it is a bit messed because some shaders apply it when Use_Bindless_Texture is defined, and other shaders check also SRGBBindlessFix. But it should be probably:\r\n```\r\n#ifdef Use_Bindless_Texture\r\n#ifdef SRGBBindlessFix\r\n    Color.xyz = pow(Color.xyz, vec3(2.2));\r\n#endif\r\n#endif\r\n```\r\nThough I can't really check it, because I don't have any graphics card that is affected by this issue.\r\n\r\nIf I would like to be pedantic, I wouldn't mix color.rgb and color.xyz because it is the same :)\r\n\r\nI'm not really sure what to do with transparent objects (the Puffy issue). Maybe use additional uniform to pass information about transparency and handle these objects in ghost shader? (I assume that it is rendered as standard transparent object and not a ghost kart). Or just not care about it, because it doesn't look thaat bad..."}}
{"actor":{"display_login":"deveee"}}