3D Graphics Engine Progress
Moderator: PC Supremacists
Re: [GroundUpEngine] 3D Engine Progress
that's awesome :D
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] 3D Engine Progress
MrDeathNote wrote:Lol, your right it does look awesome
:P Got a new screenshot, the artist fixed the door texture and stuffeatcomics wrote:that's awesome :D
->
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] lol
I changed class Vector3 to vec3 and CObject to Object
->
->
Re: [GroundUpEngine] 3D Engine Progress
I do that a lot :D
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: [GroundUpEngine] lol
Lol niceGroundUpEngine wrote:I changed class Vector3 to vec3 and CObject to Object
->
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
-
- Chaos Rift Junior
- Posts: 345
- Joined: Tue Jan 12, 2010 7:23 pm
- Favorite Gaming Platforms: PC - Windows 7
- Programming Language of Choice: c++;haxe
- Contact:
Re: [GroundUpEngine] 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.MrDeathNote wrote:Lol niceGroundUpEngine wrote:I changed class Vector3 to vec3 and CObject to Object
->
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] 3D Engine Progress
Tutorial Attempt:
Small vid on basic GLSL, and ease of use in Engine->
Link - http://www.youtube.com/watch?v=C-wUcP2I6Fo
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
Hehe, nice! Now do some lighting with it I can help you with shader stuff if you need it
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: [GroundUpEngine] 3D Engine Progress
Nice!
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] 3D Engine Progress
Thanks
*goes off to try learn some per pixel lighting*
*goes off to try learn some per pixel lighting*
Re: [GroundUpEngine] 3D Engine Progress
You should try to make the color of your "red"-shader a uniform variable, which you can set from your program
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] 3D Engine Progress
Ah I see, so 'uniform' is like constants in C++ and varying is the opposite
Re: [GroundUpEngine] 3D Engine Progress
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);
}
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] 3D Engine Progress
Oh damn
/fail
Sweet, thanks for the info!
/fail
Sweet, thanks for the info!
-
- Respected Programmer
- Posts: 387
- Joined: Fri Dec 19, 2008 3:33 pm
- Location: Dallas
- Contact:
Re: [GroundUpEngine] 3D Engine Progress
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".
"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".