Skip to main content
19 events
when toggle format what by license comment
Jul 9, 2013 at 12:05 vote accept Basaa
Jul 9, 2013 at 12:05 answer added elFarto timeline score: 2
Jul 9, 2013 at 11:22 comment added Basaa What exactly do you mean with the setup code? gdse suggests me to continue in chat to prevent extended discussions in comments.
Jul 9, 2013 at 11:19 comment added Basaa let us continue this discussion in chat
Jul 9, 2013 at 11:18 comment added elFarto Ok, if you don't have a fragment shader bound, and turning off blending shows it correctly, then you have something else in your state that is messing with the alpha value, since that image could not have been produced if the alpha value was 1. I think you might need to post the setup code to rendering the quad.
Jul 9, 2013 at 11:14 comment added Basaa Yes, then it will render fine, but I need blending.
Jul 9, 2013 at 9:38 comment added elFarto If you disable blending, does the quad render the correct colour?
Jul 9, 2013 at 8:00 comment added Basaa Nope. No shaders. Only for the 3D scene.
Jul 9, 2013 at 7:07 comment added elFarto Do you have any fragment shader bound when rendering the quad?
Jul 9, 2013 at 6:18 comment added Basaa Many thanks, but there is no 0.2 or 0.8 in my project. It looks like my entire blending is f*cked up, as if I try to draw another rectangle on top of the blue one, it shows black no matter what color I assign to it. I'm completely lost.
Jul 9, 2013 at 3:04 comment added Kevin Reid FYI, I did a little calculation based on the color values in your screenshot, and the colors inside the rectangle vs. outside are pretty close to 0.2 * vec3(0, 0, 1) + 0.8 * outsideColor — that is, like an RGBA color of 0, 0, 1, 0.2. Assuming your screenshot has no color/gamma correction, anyway (which is likely since the colors line up neatly). I suggest looking around your code for where you have the number 0.2 or 0.8, to see where that might have arisen.
Jul 8, 2013 at 21:07 history edited Basaa CC BY-SA 3.0
deleted 1 characters in body
Jul 8, 2013 at 20:57 history edited Basaa CC BY-SA 3.0
added 294 characters in body
Jul 8, 2013 at 20:56 comment added Basaa Yes I bean glBegin, sorry. Added the quad code.
Jul 8, 2013 at 20:24 comment added elFarto Firstly, did you mean glBegin(GL_QUADS) rather than glEnable(GL_QUADS) (which is invalid). Secondly, can you paste the code that draws the quad?
Jul 8, 2013 at 6:01 comment added Basaa Added your suggestions.
Jul 8, 2013 at 6:01 history edited Basaa CC BY-SA 3.0
Added screenshot and fragment shader source
Jul 7, 2013 at 22:50 comment added Kevin Reid Nothing is obviously wrong with what you've shown. I suggest providing more information: • A screenshot of the problem • Your fragment shader code
Jul 7, 2013 at 19:51 history asked Basaa CC BY-SA 3.0