I've started working on the drawing chapter of open.gl. You can expect it to be finished this weekend.
Sneak preview:
![]()
I've started working on the drawing chapter of open.gl. You can expect it to be finished this weekend.
Sneak preview:
![]()
Is that South-America you're drawing?
No, its obviously Orion's Nebula
holy shit when did you start working on open.gl again
Aww no more WAYWO Drama
How about open.gl/drama because it was funning
suddenly swimming
Edited:
my shitty walking animation is so incomprehensible i made it the swimming one aswell, it kinda works.
I've checked and rechecked to make sure nothing lossy is going on (like converting a float to an int and THEN multiplying by amplitude), and I've come to the conclusion that Processing's implementation of 1D Perlin noise is a bit flawed.
this was suppose to be where he attacks.
Looks like he's having a seizure![]()
Should I work on my game? No! I'll work on cash4ads.biz.
I'm procrastinating by doing something equally hard. That's new.
Edited:
In other news, I decided that I didn't need a whole GUI system like GWEN for my game. Then I wrote a GUI system like GWEN for my game.
Putting Perlin Noise map generation in my game
Edited:
And different textures
![]()
What is this, a website for ANTS? That website is gonna need to be at least... Three times bigger than this!
That awesome moment, when you got HLLIb working and can now support mods that need original game content (i.e. Modular Combat, Obsidian Conflict)
![]()
Player + collisions!
I know from the code I wrote there are some minor bugs with the collisions that have a chance of +/- 0.4% of happening, but when I try to fix them, they only get worse.
I'm proud![]()
Love2d? :D
You can't override world geometry, there simply isn't any support for it in the engine. You should instead create a custom shader which writes to COLOR0 and COLOR1 (albedo & depth in 0, pre-transformed & packed normals in 1) and render it with MRTS in the actual client dll code.
You could also just use depth for your ssao, but you would have to render the scene a second time to an RGBA32F RT in order to get 32 bit depth, which you can then scale by dividing and saturating (as it's scaled already, but RGBA32F RTs can store any float value, which means you get the whole near-far range, it just looks like it's scaled.
I made a shitty outline shader ages ago to test 32 bit depth.
![]()
I finally got my camera moving.
Good, now remake RollerCoaster Tycoon
Edited:
Forests =D
But somebody already did that.
Edited:
Also it's for an iOS game.
I am not exactly sure if it has been posted yet, and it isn't strictly something I am working on but;
Farb-rausch made all their demo tool and demo source codes public!
Here is the link:
https://github.com/farbrausch/fr_public
Simply amazing! And all the readme's and diaries make it kind of a historical archive.
Is phong shading noticeable with just a cube? or do you need something more smooth to really notice it?
I have this lighting:
drawable2->setAmbientLighting( glm::vec4( 50, 60, 125, 230) ); drawable2->setDiffuseLighting( glm::vec4( 0.6f, 0.4f, 0.2f, 0.8f) );
which produces this effect:
![]()
A pause screen, introducing the first shader I've ever made!![]()
![]()
Phong works on anything, you only need correct surface normals.
Does this look correct for phong shading?
I think my code is correct but theres something buggy about it
Post your code, I don't see any phong what so ever in that video.
Blinn-phong is pow( saturate( dot( normal, h ) ), hardness ); where h is lightvec + view direction.
The awkward moment, when you don't see any in the picture
Pretty sure he refers to the shader being used in the hud to bend it.
Ah Okay, that would make sense
using http://ogldev.atspace.co.uk/www/tuto...utorial18.html
this is to calculate the normals of the vector:
void Drawable::phongNormals() { int amount = vertex_data.size(); std::vector<glm::vec3> vecsToCheck; for(int i = 0; i < amount; i++) { bool foundIt = false; for(int j = 0; j < vecsToCheck.size(); j++) { if(vecsToCheck[j] == vertex_data[i]) foundIt = true; } if(!foundIt) vecsToCheck.push_back(vertex_data[i]); } for(int i = 0; i < vecsToCheck.size(); i++) { const glm::vec3 ver = vecsToCheck[i]; std::vector<glm::vec3> norms; std::vector<unsigned int> indexs; for(int j = 0; j < amount; j++) { if(ver == vertex_data[j]) { norms.push_back(norm_data[j]); indexs.push_back(j); } } glm::vec3 norm = glm::vec3(0.0f); for (unsigned int j = 0; j < norms.size(); j++) { norm += norms[j]; } norm = glm::normalize(norm); for (unsigned int j = 0; j < indexs.size(); j++) { norm_data[indexs[j]] = norms[j]; } } }
this is the frag shader:
#version 120 varying vec2 uv; uniform sampler2D myTexture; uniform bool DrawLines; varying vec3 normals; uniform vec4 AmbientLight; uniform vec4 DiffuseLight; void main(){ vec4 color; if(DrawLines) { color = vec4(1,1,1,1); } else { color = texture2D( myTexture, uv ).rgba; vec3 ambLight = AmbientLight.xyz * AmbientLight.w; float DiffuseFactor = dot(normals, DiffuseLight.xyz); vec3 diffLight = vec3(0, 0, 0); if (DiffuseFactor > 0) { diffLight = DiffuseLight.xyz * DiffuseLight.w * DiffuseFactor; } color.xyz = color.xyz * (ambLight + diffLight); } gl_FragColor = color; }
and the vert shader:
#version 120 uniform mat4 MVP; uniform mat4 Model; attribute vec4 Position; attribute vec2 UV; attribute vec3 Normals; varying vec2 uv; varying vec3 normals; void main(){ normals = normalize((Model * vec4(Normals.x, Normals.y, Normals.z, 0.0f)).xyz); uv = UV; gl_Position = MVP * Position; }
Try it on something like a sphere. Itll be immediately obvious if it isn't working properly
I can't see anything which doesn't look like phong
That equally awesome moment when you are told mat_hdr_level 3 enables floating point HDR allowing for a better depth buffer and DoF. Just noticed I had DoF enabled on the r_depthoverlay. Also the shader is yes for the HUD, it doesn't just bevel it also adds the glow and scanlines, they are quite subtle but any more obvious and it starts to become unreadable.
My original compiler emitted LLVM IR for the input, until I thought "but I'll end up repeating a lot of the stuff that's already in the LLVM API", so naturally I had the great idea of branching the code. Needless to say the one using the API was a billion times harder to code, until I saw this great method I'd somehow overlooked -- ParseAssemblyString. It takes LLVM IR and returns a module containing the result of parsing, but not only that: It doesn't just create standalone modules, you can give it a module to add the IR to, and the machine will use that to be conscious of previous definitions.
For example, you define a function in one module, then as you create another module from IR, the machine will be aware of the previous definition in that other module, it won't bitch about how type X or function Y has not been defined. This is cool as shit.
I don't see any phong code though, only regular diffuse lighting.
Oh that article is stupid, it describes phong as the normal interpolation which is done REGARDLESS of which lighting model you are using.
For the actual specular reflection, known as blinn-phong you should try the code I said. http://en.wikipedia.org/wiki/Blinn%E..._shading_model
Or you could do it the more inefficient, accurate way:
![]()
So is it phong shading that gives it that smooth effect? or is it normal interpolating? because atm this is what my code produces:
![]()
Just got pathfinding working in our group assignment :D
Got freetype to draw somewhat correctly, although the alphas are not working as intended...
![]()
Make sure to also include this in the menu because not every device supports 5 fingers.
Edit:
Whooops, got ninja'd by nearly 20 hours. :(
Phong is the reflection model, what you're referring to is phong interpolation. I don't understand why you are having to set this up manually, doesn't opengl have automatically interpolated normals in pixel shaders like dx?