Did anyone encounter a performance benefit using a separate VBO for only positions (ex. for depth pass, shadow mapping pass)?
Type: Posts; User: biller23
Did anyone encounter a performance benefit using a separate VBO for only positions (ex. for depth pass, shadow mapping pass)?
OMG you're right. I accidentally changed some piece of my spaghetti code, and.. tahdah.. it works! I can see the Moiré pattern!
Thanks anyway.
I have some trouble with the simple shadow mapping.
I'm using textureProj() with sampler2DShadow.
Maybe i put the wrong TextureMatrix.
Proj-Light --> perspective projection of the light...
This makes sense in the spec, but he's talking about the quick reference card. Why are these functions displayed there?
Have you tried to set the vertex color calling glColor()? The vertex color needs to be different than the default black, becouse it will be multiplied with the texture color.
With the fixed-functions pipeline, simply disable the lights.
With shaders, simply use your diffuse color (from vertex or texture) directly as output of the fragment shader.
He actually answered your question.
With the command glScalef and so on, you're changing the projection setted by glOrtho. Switch to Modelview matrix before these commands or your projection...
Just multiply "left" and "right" with aspect = screen_width/screen_heigth.
BTW: no search engine works with "glOrtho aspect ratio"?
I'm not sure I've understood correctly what you have asked.
Which directional versor?
The forward direction of the camera? In this case it's simple. You can extract this vector easily from the...
1) A scalar Boolean expression is expected.
2) This is not a boolean operation.
Try this:
bvec3 bv = equal(color.xyz, vec3(1.0f, 0.0f, 0.0f));
if ( bv.x && bv.y && bv.z)...
To achieve a "movement", you need to add an offset value to the current position. Suppose that the object is in the point 'p' = (x, y), and the change of position is 'offset' = (-2, 0), then the new...
What do you mean with "local space"?
To do a local space transformation (ex. rotation), you need to have three arbitrary orthonormal axes, and you must build a rotation matrix relative to these axes...
I do not tested your code but the angles are in radians. Do not forget to convert them back.
BTW: why have you decided to allocate memory in the heap during matrix multiplication?
What represents a Mat4 (m16]) if the elements of index [3], [7], [11] are not zero?
(i know that perspective projection matrix has -1 on [7] elements, if i recall correct..)
What happens if a...