Members in Shoutbox
None.
Shoutbox Search
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.
[2015-12-16. : 5:52 am] Roy -- Do yourself a favor and abandon web forms. There are way too many smart people saying bad things about it.[2015-12-16. : 5:23 am] O)FaRTy1billion[MM] -- I was supposed to do stuff then get tacos, but now I only have 40 minutes to get tacos ;o[2015-12-16. : 5:22 am] O)FaRTy1billion[MM] -- anyway, I've been distracted from my work long enough now.[2015-12-16. : 5:21 am] O)FaRTy1billion[MM] -- so a = random number between 0 and 2pi; r = random number between 0 and your radius (6 was it?); coord.x += sin(a)*r; coord.y += cos(a)*r; ... then set the point radius to 1 on a non-exploded firework and you got a circle [2015-12-16. : 5:18 am] KrayZee -- For once I feel poor in GTA Online. And playing heists to get more money is the fastest way without glitches... but I don't like unreliable randoms[2015-12-16. : 5:13 am] O)FaRTy1billion[MM] -- or would both random radii be the same? I'm sure it doesn't matter .. just trying to get more distribution that way[2015-12-16. : 5:12 am] O)FaRTy1billion[MM] -- like coord.x += sin(random number between 0 and 2pi) * (random number between 0 and radius); coord.y += cos(the same random number between 0 and 2pi) * (perhaps a different random number between 0 and radius)[2015-12-16. : 5:10 am] Dem0n -- FaRTy1billionFaRTy1billion shouted: I meant smaller and in a tight radius (not all the exact same coordinate) so they just appear as a circle Oh. Yeah that's effort [2015-12-16. : 5:10 am] Dem0n -- Not to mention it was ripped straight from a tutorial that I read, so I wasn't trying to keep that exact code in there[2015-12-16. : 5:10 am] O)FaRTy1billion[MM] -- I meant smaller and in a tight radius (not all the exact same coordinate) so they just appear as a circle[2015-12-16. : 5:09 am] Dem0n -- I did have them smaller at first, but they ended up blending in with exploded particles from other fireworks, so I decided to make the firework particle slightly bigger than the exploded particles[2015-12-16. : 5:08 am] O)FaRTy1billion[MM] -- you could give them a smaller size and create randomized within a tight radius of their spawn position, at least for the launching firework[2015-12-16. : 5:03 am] Dem0n -- I wish I could've figured out how to make the points circular, though[2015-12-16. : 5:02 am] Dem0n -- I mean they were trying to figure out the shader thing, but none of us knew shit about it, and I only figured it out cuz you helped me[2015-12-16. : 5:01 am] O)FaRTy1billion[MM] -- also who is "we"? If you're doing this with someone else why didn't they help? [2015-12-16. : 5:00 am] Dem0n -- It's technically just extra credit, so it didn't have to be something amazing[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 [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] -- ... 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] O)FaRTy1billion[MM] -- FaRTy1billionFaRTy1billion 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 -- I thought I read somewhere it automatically changes 0-255 to 0.0 to 1.0, but maybe not[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: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: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: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 -- 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 |