Now I am no expert, but I believe the standard way of shadowing larger terrains is cascaded shadow maps. I implemented these myself, and boy, is it a pain! So if you are making a Minecraft clone (I...
Type: Posts; User: cireneikual
Now I am no expert, but I believe the standard way of shadowing larger terrains is cascaded shadow maps. I implemented these myself, and boy, is it a pain! So if you are making a Minecraft clone (I...
You probably are not double-buffering. How you enable it depends on your windowing system.
My system uses 4 buffers: View-space position (RGB16F) (doing it in view space means you don't need 32 bit floats), view-space normals (RGB16F), diffuse color and specularity (RGBA8) (rgb - diffuse,...
Here is a tutorial: http://ogldev.atspace.co.uk/www/tutorial35/tutorial35.html
The tutorial uses the stencil buffer to cull fragments that are not affected by the light, but I would recommend you do...
If you are making a Minecraft clone, just pre-calculate the lighting. That, or if it needs to be dynamic, use deferred shading. Most of these Minecraft engines use a flood fill algorithm to bake...
Here is a screen-space reflection shader I implemented:
uniform sampler2D gColor;
uniform sampler2D gPosition;
uniform sampler2D gNormal;
uniform sampler2D gEffect;
uniform vec2...
http://www.videotutorialsrock.com/opengl_tutorial/terrain/text.php
The rotation transformation will remain and affect everything else unless you call glLoadIdentity after drawing the object you want to rotate.
That is normal. In all likelihood your monitor can only go to 60 fps, so anything above that is a waste (at least for graphics). You can limit the frame rate with vertical sync, this will also...
Did you set up an orthographic projection matrix?
Your depth function is set to GL_ALWAYS, so it will always pass the depth test. Make it GL_LESS or GL_LEQUAL.
Here is a library I made for 2D lighting a while ago: http://en.sfml-dev.org/forums/index.php?topic=6635.0
Try forcing it in your graphics control panel (Catalyst for ATI, Nvidia Control Panel for Nvidia).
Do you have vertical sync enabled?
True. You can decompose the mesh into convex shapes though, using something like HACD: http://sourceforge.net/projects/hacd/
You could spam random points (or make a grid) and take the dot product with the vector from those points to every vertex in the model and the normal at the vertex. If it is positive, the point is not...
Don't find intersection points. Just make the textures for the models have hand-drawn lines on them. Then, to get the outline around the entire model, you can render the model again but with no...
try IL_ORIGIN_LOWER_RIGHT. You can also just change the texture coordinates to make it work by switching the 0's and 1's for the x (aka s) component of the texture coordinate.
Every frame you update the position (add on to it) with the velocity. The velocity is the direction to the goal = (endPoint - startPoint).Normalize(), scaled by the speed.
When the object is...
You are transforming after you draw the cube. You need to call glRotatef before you draw the cube, or else it will remain unaffected.
Try this:
Vector3 velocity = (endPoint - startPoint).Normalize() * speed;
meshPosition += velocity;
Where endPoint, startPoint, and meshPosition are 3 component vectors and speed is a scalar....
NVM, I figured it out. It was a really stupid mistake. The Render_Distance function improperly culled away objects with large AABB radii. Thanks for the help anyways though!
try this:
ilEnable(IL_ORIGIN_SET);
ilOriginFunc(IL_ORIGIN_LOWER_LEFT);
How are you loading the textures? Some texture loaders load images upside-down.
http://www.arcsynthesis.org/gltut/