The GLSL specification explicitly states that you have to match the comparison mode with the sampler type (*Shadow). Otherwise the behavior is undefined.
Type: Posts; User: Komat
The GLSL specification explicitly states that you have to match the comparison mode with the sampler type (*Shadow). Otherwise the behavior is undefined.
I think that you might find some examples in older ATI or Nvidia SDK.
The env parameters are shared between all programs of the same type (e.g. fragment) while the local parameters are set for...
You can set the texture function to ignore the alpha from the texture and use only alpha from the vertex color when you are drawing the FBO to the screen. You can do that using the GL_COMBINE texture...
About the depth buffers in the GLUT. It seems that the GLUT asks for 32bit depth format for the main framebuffer however what it gets depends on the HW, driver and combination of other parameters...
You can try following Nvidia example. It appears that it supports FBO.
My FBO binding code is following. One additional difference is that I left the texture set in the default GL_LUMINANCE mode.
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, framebuffer_object ) ;...
The second pass does not make sense to me at all.
First, it renders the scene as if the camera was in zero so the geometry drawn on the screen does not have any relation to what is seen by the...
You do not need to have the color attachment. I am using code very similar to the one mentioned in the extension specification and it works. You might try another depth format. I am using the...
What did you intended to archieve with the second pass? Normally there should be two passes. Render into the shadowmap from the position of the light and then render from the position of the camera...
While it is up to the driver to implement it, I think that most drivers support it. The most likely reason for its absence is, that the PC in question does not have OGL capable drivers installed.
...
How do you calculate the texture coordinates and what filtering mode is set on those textures? It is possible that you sample different texels or even combination of them (if filtering is enabled).
You do not need to use glVertexPointer provided that you have generic vertex attribute array (glVertexAttrib) bound (and enabled) to generic attribute 0. Those two things are required to be...
The MAX_VERTEX_UNIFORM_COMPONENTS_ARB definition talks about individual floats. Based on following comment within the specification, one float is intended to be really one float and not vec4.
It...
That is because they are not absolute. The light position is transformed by modelview matrix which was set when the positioning glLightfv() call was made and the resulting eye space coordinates are...
All those arrays are indexed simultaneously to form input for the vertex processing. Vertex whose position is in 3th element of the vertex array will have color which is the 3th element of the color...
The likely reason is mismatch between row-major and column-major memory interpretations of the matrix as you move it around (i.e. one api stores it in one way while the next part of the program...
I would suspect that something is wrong with the lightViewMatrix and viewInverseMatrix matrices. Maybe they are transposed? If the light camera is in the same position as view camera, they will...
You are multipling some matrices in incorrect order. When you combine the calculations you wrote the equivalent is
light_mvp = lightProjectionMatrix * MV * (V ^ -1) * lightViewMatrix
which is...
And what if there is no branch?
float base = SomeComplexCalculation() ;
float exponent = SomeCalculationInvolvingUniforms() ;
float value = pow( base, exponent ) ;
gl_FragColor = vec4( value...
This might be not just few dummy instructions. For example if the optimization decides that some calculation will not influence the output, it might remove all texture sampling, varyings or even hw...
You might be able to detect few simple cases where this is yes or no. There are situations when some calculation is ignored not because simple if statement. It might be always multiplied by constant...
What about early out in the "they are certainly closer" (distance of centroids is smaller than limit) and "they are certainly further" (distance of bounding spheres with centers in centroids is...
I think that the main reason are programs using one big shader containing many uniform-based if statements (or similiar construct) used to implement materials with various features. In that case the...
I do not have experience with the FLTK. What happens if you remove both
mode (FL_RGB | FL_DEPTH | FL_DOUBLE);
// mode (FL_RGB | FL_DEPTH | FL_DOUBLE | FL_STENCIL);
lines and move all...
If specification says that only some values are allowed and your card does not export additional extension which extends that list, you should never pass value other than those listed even if it...