Members in Shoutbox
None.

Shoutbox Search
Search for:


Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper
/me > Marks as action

Shoutbox Information
Moderators may delete any and all shouts at will.
Global Shoutbox
Please log in to shout.
Pages: < 1 « 2068 2069 2070 2071 20723572 >

[2015-12-16. : 4:54 am]
O)FaRTy1billion[MM] -- or at least send a screenshot
[2015-12-16. : 4:47 am]
O)FaRTy1billion[MM] -- also send me the program when you're done, I wanna see it
[2015-12-16. : 4:44 am]
O)FaRTy1billion[MM] -- Although if you really want to get fancy you could make the shader do stuff, but I don't know if I'd be able to help with that since shaders are where I stopped doing stuff with opengl :P
[2015-12-16. : 4:43 am]
O)FaRTy1billion[MM] -- because without a shader, your original code of just glColor and glVertex would've worked immediately
[2015-12-16. : 4:43 am]
O)FaRTy1billion[MM] -- I feel like the biggest hurdle was (and is) that it's using a shader that really doesn't do anything and isn't needed
[2015-12-16. : 4:42 am]
O)FaRTy1billion[MM] -- :wob:
[2015-12-16. : 4:42 am]
Dem0n -- farty I love you :cube:
[2015-12-16. : 4:42 am]
Dem0n -- YES IT WORKS
[2015-12-16. : 4:42 am]
O)FaRTy1billion[MM] -- ... or unless you had changed it since sending this to me
[2015-12-16. : 4:41 am]
O)FaRTy1billion[MM] -- unless int / float does some weird thing where it's always 1
[2015-12-16. : 4:40 am]
O)FaRTy1billion[MM] -- "red = (rand() / (float)RAND_MAX);" that looks correct to me ;o
[2015-12-16. : 4:40 am]
Dem0n -- ohh
[2015-12-16. : 4:40 am]
O)FaRTy1billion[MM] -- FaRTy1billion
FaRTy1billion shouted: I did (float)rand()/RAND_MAX as my value, so that it is in the range 0.0 to 1.0
[2015-12-16. : 4:39 am]
O)FaRTy1billion[MM] -- It might do that somewhere in some specific way, but it's best just to get used to 0.0-1.0
[2015-12-16. : 4:39 am]
Dem0n -- Do you know how to make a random number between 0.0 and 1.0?
[2015-12-16. : 4:39 am]
Dem0n -- I thought I read somewhere it automatically changes 0-255 to 0.0 to 1.0, but maybe not
[2015-12-16. : 4:39 am]
Dem0n -- the alpha value changes properly though so that's good
[2015-12-16. : 4:38 am]
O)FaRTy1billion[MM] -- Are their colors 0.0-1.0, or are you trying to do 0-255 again?
[2015-12-16. : 4:38 am]
Dem0n -- all the particles are white
[2015-12-16. : 4:38 am]
O)FaRTy1billion[MM] -- Or do you mean everything is white?
[2015-12-16. : 4:38 am]
O)FaRTy1billion[MM] -- Sounds like a step in the right direction. xD
[2015-12-16. : 4:37 am]
Dem0n -- =O i moved it before glBegin and now everything is white
[2015-12-16. : 4:36 am]
O)FaRTy1billion[MM] -- Because typically changing states of things between begin/end is prone to breaking things
[2015-12-16. : 4:35 am]
O)FaRTy1billion[MM] -- I don't know, but if it's not working that is my best guess
[2015-12-16. : 4:35 am]
Dem0n -- ..can it not go in between begin and end? :O
[2015-12-16. : 4:34 am]
O)FaRTy1billion[MM] -- give me your paintGL code, it could just be the setUniformValue is set somewhere where it isn't working properly (like between begin/end)
[2015-12-16. : 4:32 am]
O)FaRTy1billion[MM] -- Except if the frag color set to a constant value worked, I don't see why the uniform doesn't work
[2015-12-16. : 4:30 am]
O)FaRTy1billion[MM] -- I feel like it was drawn with an array, and colors are passed as part of that array
[2015-12-16. : 4:30 am]
O)FaRTy1billion[MM] -- How does the code you originally took from this draw stuff?
[2015-12-16. : 4:29 am]
O)FaRTy1billion[MM] -- That's what I meant. In the one you sent me with gl_FragColor = vec4(1, .5, 1.0, 0.8);
[2015-12-16. : 4:29 am]
Dem0n -- nope, they were black before I specifically set them with gl_FragColor
[2015-12-16. : 4:28 am]
O)FaRTy1billion[MM] -- I dunno lol. Were the dots pink/a color before you started messing with the shader?
[2015-12-16. : 4:27 am]
Dem0n -- Doesn't help
[2015-12-16. : 4:26 am]
O)FaRTy1billion[MM] -- layout( location = 0 ) out vec4 FragColor; ... gl_FragColor = vColor; That's weird O.o Try changing gl_FragColor to FragColor
[2015-12-16. : 4:26 am]
Dem0n -- colorVec is the vector I make
[2015-12-16. : 4:26 am]
Dem0n -- and then wire_shader.setUniformValue(wire_shader.uniformLocation("Color"), colorVec);
[2015-12-16. : 4:25 am]
Dem0n -- In paintGL. I make a QVector4D which stores the rgba values of the specific Firework
[2015-12-16. : 4:25 am]
O)FaRTy1billion[MM] -- now where is your code that sets "Color"?
[2015-12-16. : 4:24 am]
O)FaRTy1billion[MM] -- ok, so that should be fine
[2015-12-16. : 4:22 am]
Dem0n -- http://pastebin.com/zQFVvq7z
[2015-12-16. : 4:20 am]
O)FaRTy1billion[MM] -- Since you're passing the color with a uniform, you'll need to set gl_FragColor to that value
[2015-12-16. : 4:19 am]
O)FaRTy1billion[MM] -- or both
[2015-12-16. : 4:19 am]
O)FaRTy1billion[MM] -- Paste your fragment shader
[2015-12-16. : 4:19 am]
Dem0n -- okay it is drawing, but they're all black (wasn't showing up on black screen before)
[2015-12-16. : 4:18 am]
O)FaRTy1billion[MM] -- Dem0n
Dem0n shouted: wire_shader.setAttributeBuffer( "Color", GL_FLOAT, 0, 3 ); wire_shader.enableAttributeArray( "Color" );
Probably.
[2015-12-16. : 4:18 am]
O)FaRTy1billion[MM] -- Is it an attribute or a uniform?
[2015-12-16. : 4:17 am]
Dem0n -- Like that?
[2015-12-16. : 4:17 am]
Dem0n -- wire_shader.setAttributeBuffer( "Color", GL_FLOAT, 0, 3 ); wire_shader.enableAttributeArray( "Color" );
[2015-12-16. : 4:17 am]
Dem0n -- Yeah it's QVector4D, but still nothing is showing up on the screen. Maybe I'm not setting the rgba values correctly then
[2015-12-16. : 4:17 am]
O)FaRTy1billion[MM] -- did the original code by chance have you draw with an array or buffer? I think that's what all this 'in' shit is for
[2015-12-16. : 4:16 am]
O)FaRTy1billion[MM] -- since I could try stuff myself as I go
[2015-12-16. : 4:16 am]
O)FaRTy1billion[MM] -- if I could compile this I could probably help better xD
[2015-12-16. : 4:15 am]
O)FaRTy1billion[MM] -- otherwise you can always setUniformValue(int location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) xD
[2015-12-16. : 4:14 am]
O)FaRTy1billion[MM] -- is it a QVector4D ?
[2015-12-16. : 4:13 am]
Dem0n -- This stuff is dumb lel
[2015-12-16. : 4:13 am]
Dem0n -- I'm trying to pass a vector in as the value for vec4 Color, but it's saying it can't convert that to GLFloat so like wat
[2015-12-16. : 4:10 am]
O)FaRTy1billion[MM] -- ok, then proceed with what you are doing. Maybe I'm not totally understanding in vec3 aColor;
[2015-12-16. : 4:10 am]
Dem0n -- hmmmmmmm
[2015-12-16. : 4:09 am]
Dem0n -- Nothing shows up when i try it that way
[2015-12-16. : 4:09 am]
O)FaRTy1billion[MM] -- Before the fragment shader just ignored vColor and assigned gl_FragColor to some pink color or something
[2015-12-16. : 4:08 am]
O)FaRTy1billion[MM] -- because, unless I'm wrong, the vertext shader takes the color (in vec3 aColor;), and then assigns it to vColor (vColor = aColor;), and then the fragment shader takes that and, with the fix, assigns it to gl_FragColor which is then drawn on the screen
[2015-12-16. : 4:07 am]
Dem0n -- earlier when I had no idea how to set the colors
[2015-12-16. : 4:07 am]
Dem0n -- How does the shader interact with glColor? I didn't understand why the shader was like superceding glColor
[2015-12-16. : 4:06 am]
O)FaRTy1billion[MM] -- You can, with glColor
[2015-12-16. : 4:06 am]
Dem0n -- yeah I did that, but I still need to be able to dynamically set vColor
[2015-12-16. : 4:06 am]
O)FaRTy1billion[MM] -- ... assuming my understanding is correct
[2015-12-16. : 4:06 am]
O)FaRTy1billion[MM] -- so with that changed, glColorwhateverf(numbers) should actually matter
[2015-12-16. : 4:05 am]
O)FaRTy1billion[MM] -- because the vColor is the color that has been passed along to that point, until the shader just threw it away by not using it
[2015-12-16. : 4:05 am]
O)FaRTy1billion[MM] -- yes
[2015-12-16. : 4:04 am]
Dem0n -- What, gl_FragColor = vColor?

Pages: < 1 « 2068 2069 2070 2071 20723572 >


Members Online: tokatta007