Page 11 of 20

Re: [GroundUpEngine] 3D Engine Progress

Posted: Wed Mar 24, 2010 5:49 pm
by eatcomics
that's awesome :D

Re: [GroundUpEngine] 3D Engine Progress

Posted: Wed Mar 24, 2010 5:57 pm
by GroundUpEngine
MrDeathNote wrote:Lol, your right it does look awesome :)
eatcomics wrote:that's awesome :D
:P Got a new screenshot, the artist fixed the door texture and stuff :)

->
Image

Re: [GroundUpEngine] lol

Posted: Thu Mar 25, 2010 1:09 pm
by GroundUpEngine
I changed class Vector3 to vec3 and CObject to Object :lol:

->
Image

Re: [GroundUpEngine] 3D Engine Progress

Posted: Fri Mar 26, 2010 4:38 pm
by eatcomics
I do that a lot :D

Re: [GroundUpEngine] lol

Posted: Sat Mar 27, 2010 5:08 am
by MrDeathNote
GroundUpEngine wrote:I changed class Vector3 to vec3 and CObject to Object :lol:

->
Image
Lol nice :lol:

Re: [GroundUpEngine] lol

Posted: Sat Mar 27, 2010 8:36 am
by Live-Dimension
MrDeathNote wrote:
GroundUpEngine wrote:I changed class Vector3 to vec3 and CObject to Object :lol:

->
Image
Lol nice :lol:
+1. I especially love it when you have 10,000 errors and changing one/two things suddenly results in a compiled EXE. At first it's like "Man, this shits broken to hell, it'll never be fixed". Then it's like cool.

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 12:07 am
by GroundUpEngine
Tutorial Attempt: :lol:

Small vid on basic GLSL, and ease of use in Engine->

Link - http://www.youtube.com/watch?v=C-wUcP2I6Fo

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 6:02 am
by K-Bal
Hehe, nice! Now do some lighting with it ;) I can help you with shader stuff if you need it ;)

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 6:23 am
by MrDeathNote
Nice!

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 11:55 am
by GroundUpEngine
Thanks ;)
*goes off to try learn some per pixel lighting*

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 12:28 pm
by K-Bal
You should try to make the color of your "red"-shader a uniform variable, which you can set from your program ;)

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 12:39 pm
by GroundUpEngine
Ah I see, so 'uniform' is like constants in C++ and varying is the opposite :)

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 2:08 pm
by K-Bal
No. Uniforms are your normal parameters you can pass to your shader. It's more or less like a parameter of a function call ;) For example, your color could be set in your program with

Code: Select all

float r,g,b;
glSendUniform3f(glGetUniformLocation("color"), r, g, b);

Code: Select all

#version 120

uniform vec3 color;

const float alpha = 0.3;

void main()
{
   gl_FragColor = vec4(color, alpha);
}

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 2:28 pm
by GroundUpEngine
Oh damn :lol:
/fail

Sweet, thanks for the info!

Re: [GroundUpEngine] 3D Engine Progress

Posted: Sun Mar 28, 2010 2:33 pm
by qpHalcy0n
No, you had it right.

"uniform" variables in GLSL are indeed read-only (constant). They are passed to constant registers on the logic unit (You can define them at compile time (in the shader) or link time (from the caller). "varying" parameters in GLSL are passed by "register" so its almost like the "register" keyword in C++ and only the vertex units and pixel ALU's can write to GPU registers.

They're trying to make GLSL a little more HLSL-esque so "varying" is actually deprecated in the current version of GLSL (although every driver i've seen still supports it). The preferred method is the HLSL syntax of "out"/"in".