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 « 2036 2037 2038 2039 20403539 >

[2015-12-16. : 4:02 am]
Dem0n -- What do you mean fixed shader?
[2015-12-16. : 4:02 am]
Dem0n -- Like make glColor(r,g,b,a) the second parameter?
[2015-12-16. : 4:01 am]
O)FaRTy1billion[MM] -- But I still say just pass the color with glColor and the fixed shader
[2015-12-16. : 4:00 am]
O)FaRTy1billion[MM] -- so thing.setUniformValue(thing.uniformLocation("words"), yourValue);
[2015-12-16. : 4:00 am]
O)FaRTy1billion[MM] -- oh, uniformLocation("name");
[2015-12-16. : 3:59 am]
O)FaRTy1billion[MM] -- I don't know how to get the int with Qt
[2015-12-16. : 3:59 am]
O)FaRTy1billion[MM] -- http://doc.qt.io/qt-4.8/qglshaderprogram.html#setUniformValue lol it's because it's got a ton of variations that alternately take the string or the int
[2015-12-16. : 3:58 am]
Dem0n -- I don't know what this error means then
[2015-12-16. : 3:57 am]
O)FaRTy1billion[MM] -- "uniform type name;"
[2015-12-16. : 3:57 am]
O)FaRTy1billion[MM] -- uniform is just uniform
[2015-12-16. : 3:57 am]
O)FaRTy1billion[MM] -- like if you had vertex, texcoords, bumpcoords, or other shit
[2015-12-16. : 3:56 am]
O)FaRTy1billion[MM] -- It's so you can specify the format of your shader's input
[2015-12-16. : 3:56 am]
O)FaRTy1billion[MM] -- Oh. Location is for the array you are giving to the shader
[2015-12-16. : 3:55 am]
Dem0n -- layout (location = 0) out vec4 FragColor
[2015-12-16. : 3:55 am]
Dem0n -- idk. setUniformValue takes in 'int location' as its first parameter, and in the shader there are layout location things defined
[2015-12-16. : 3:54 am]
O)FaRTy1billion[MM] -- what do you mean?
[2015-12-16. : 3:53 am]
Dem0n -- oh do I have to set some location thing in the shader?
[2015-12-16. : 3:53 am]
O)FaRTy1billion[MM] -- For your next assignment, do rudimentary depth of field :P
[2015-12-16. : 3:52 am]
O)FaRTy1billion[MM] -- try without it since you should have fixed glColor with the shader
[2015-12-16. : 3:48 am]
Dem0n -- rgba* lel
[2015-12-16. : 3:48 am]
Dem0n -- colorVec has 4 values for rpga
[2015-12-16. : 3:48 am]
Dem0n -- I have a uniform vec4 Color in my shader, and I'm trying to do wire_shader.setUniformValue("Color", colorVec)
[2015-12-16. : 3:47 am]
Dem0n -- First parameter is const char *, and I'm passing in a string like the other one does, but it says, "cannot convert from const char [7] to int"
[2015-12-16. : 3:47 am]
O)FaRTy1billion[MM] -- What are you setting? You shouldn't need the color one anymore
[2015-12-16. : 3:46 am]
Dem0n -- no, I'm getting a compilation error when calling setUniformValue
[2015-12-16. : 3:45 am]
O)FaRTy1billion[MM] -- Does it work?
[2015-12-16. : 3:44 am]
O)FaRTy1billion[MM] -- Dem0n
Dem0n shouted: oh i'm supposed to set it to vColor. duh
right, because this shader has the color input but instead sets gl_FragColor to a constant color
[2015-12-16. : 3:43 am]
O)FaRTy1billion[MM] -- Hmm, gl_FragColor might be a vec4, but it might not matter
[2015-12-16. : 3:42 am]
O)FaRTy1billion[MM] -- gl_FragColor is the color drawn to the pixel, and vColor is the color outputted by the vertex shader
[2015-12-16. : 3:42 am]
NudeRaider -- Budget: $2000, Budget for Excalibur: $1500 :lol:
[2015-12-16. : 3:42 am]
Dem0n -- oh i'm supposed to set it to vColor. duh
[2015-12-16. : 3:42 am]
Dem0n -- Changing gl_FragColor to vColor makes nothing show up when I run the program. or did I just do it wrong
[2015-12-16. : 3:41 am]
O)FaRTy1billion[MM] -- Your comment " // Colors and alpha value don't work. Not sure why, // maybe shaders are interfereing with it? Don't know // how to fix it." tipped me off on that :P
[2015-12-16. : 3:40 am]
O)FaRTy1billion[MM] -- in wireframe.fsh
[2015-12-16. : 3:40 am]
O)FaRTy1billion[MM] -- change gl_FragColor = vColor;
[2015-12-16. : 3:40 am]
O)FaRTy1billion[MM] -- in vec3 vColor; layout( location = 0 ) out vec4 FragColor; void main(){ gl_FragColor = vec4(1, .5, 1.0, 0.8); }
[2015-12-16. : 3:39 am]
O)FaRTy1billion[MM] -- Oh. I found your problem though I think
[2015-12-16. : 3:39 am]
Dem0n -- FaRTy1billion
FaRTy1billion shouted: you can do vec3
Is that a type outside of a shader? Or do I have just have to pass a normal vector into setUniformValue?
[2015-12-16. : 3:38 am]
Dem0n -- I've done them a little bit, but I never understood them so I didn't get the desired reults :P
[2015-12-16. : 3:38 am]
O)FaRTy1billion[MM] -- you can do vec3
[2015-12-16. : 3:37 am]
O)FaRTy1billion[MM] -- have you done shaders at all, or has it so far just been "This project uses a shader."?
[2015-12-16. : 3:37 am]
Dem0n -- If I want my uniform to be vec3 (so that it has rbg values), do I just pass in a normal vector? Or does it have to be something special?
[2015-12-16. : 3:36 am]
O)FaRTy1billion[MM] -- I did (float)rand()/RAND_MAX as my value, so that it is in the range 0.0 to 1.0
[2015-12-16. : 3:34 am]
Dem0n -- o
[2015-12-16. : 3:34 am]
O)FaRTy1billion[MM] -- so any geometry drawn will be using that shader, until a different is bound
[2015-12-16. : 3:33 am]
O)FaRTy1billion[MM] -- No. Bind just says "I'm using this shader program now."
[2015-12-16. : 3:33 am]
Dem0n -- Do I have to call bind() whenever I set the uniform value? I don't really know that does.
[2015-12-16. : 3:31 am]
O)FaRTy1billion[MM] -- But yes. A uniform is a value that is passed from your code to the shader program, which contains all of the shaders
[2015-12-16. : 3:30 am]
O)FaRTy1billion[MM] -- I think it can be in both
[2015-12-16. : 3:30 am]
Dem0n -- Does it figure out on its own which shader the uniform is in?
[2015-12-16. : 3:29 am]
O)FaRTy1billion[MM] -- whichever shader you need it in, or both
[2015-12-16. : 3:29 am]
O)FaRTy1billion[MM] -- and then add the uniform to wireframe.fsh or whatever
[2015-12-16. : 3:28 am]
O)FaRTy1billion[MM] -- copy one of those in to your render code that sets the random value
[2015-12-16. : 3:28 am]
O)FaRTy1billion[MM] -- wire_shader.setUniformValue("MVP", MVP);
[2015-12-16. : 3:26 am]
O)FaRTy1billion[MM] -- Oh, ya, this is the one from before.
[2015-12-16. : 3:26 am]
Dem0n -- The one I showed you last night had it because I was using more complex code, but I started over with a simpler project that doesn't have all that shading shit
[2015-12-16. : 3:26 am]
O)FaRTy1billion[MM] -- This might be the file you sent before
[2015-12-16. : 3:25 am]
Dem0n -- did I send you the wrong file? I don't think the one I meant to send you has them
[2015-12-16. : 3:25 am]
O)FaRTy1billion[MM] -- wait, do I have old code?
[2015-12-16. : 3:25 am]
Dem0n -- wait where are you finding these phong shader things lel
[2015-12-16. : 3:25 am]
O)FaRTy1billion[MM] -- uniform float randorwhatever;
[2015-12-16. : 3:25 am]
O)FaRTy1billion[MM] -- and you just have to add the uniform to perfrag.vsh
[2015-12-16. : 3:25 am]
O)FaRTy1billion[MM] -- so after your phong_shader.bind(); do phong_shader.setUniformValue("randorwhatever", thing);
[2015-12-16. : 3:23 am]
O)FaRTy1billion[MM] -- I didn't find that function, but I found what you need. phong_shader.setUniformValue("MVP", MVP);
[2015-12-16. : 3:21 am]
Dem0n -- Last function in that file
[2015-12-16. : 3:21 am]
Dem0n -- Yeah, it's in GLview.cpp
[2015-12-16. : 3:21 am]
O)FaRTy1billion[MM] -- Dem0n
Dem0n shouted: Does prepareShaderProgram() sound a good place to do that? :P
is it in the code you sent me? I was trying to figure out why my glext.h wasn't working
[2015-12-16. : 3:17 am]
zsnakezz -- I'd still be pretty poor though
[2015-12-16. : 3:16 am]
zsnakezz -- if only all those downloads were dollar bills
[2015-12-16. : 3:16 am]
zsnakezz -- yep

Pages: < 1 « 2036 2037 2038 2039 20403539 >


Members Online: Roy, Oh_Man, RIVE, Excalibur