It seems that you are correct. I changed both the vec tags and the color type at the same time, and I had seen an example fragment shader mixing vec3 and vec4 (a deferred shader which used vec4 for...
Type: Posts; User: VASIMR
It seems that you are correct. I changed both the vec tags and the color type at the same time, and I had seen an example fragment shader mixing vec3 and vec4 (a deferred shader which used vec4 for...
I found the issue. The shader correctly writes to the second texture if I set it to be RGBA as well (RGBA, RGBA8, RGBAF32, RGBF16, etc.). With that said, is this a requirements with FBOs, where all...
For the first person camera, you could try using glLookAt, by setting the camera / eye position to be at the center of the head, and then placing the look at target on a unit sphere (centered on the...
All of the shaders that I am calling while the FBO is active are writing to location 1, however, the texture doesn't seem to change. I tried even revering the texture back to RGB8 form, and am...
I was considering doing that, however, I don't think it needs to be that precise. As I said, I am only planning on using it for MLAA and discarding fragments on the far plane. I figured that I could...
Specifically what I am looking to do is save the depth buffer in RGBF16/F32 (or RF16/F32 format if that will work) so that I can send it to a sampler2D to be used in the edge detection stage of an...
Thanks for the reply. I attempted to do the following:
float * buffer = new float[1024*780];
glGetTexImage(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT,GL_FLOAT,buffer);
...
Thanks for the reply. I tried gdebugger and was able to verify that the depth information is indeed writing to the depthTex. Additionally, as you suggested, the depth values are around 0.989..
With...
Hello,
I am attempting to save the both the frag and depth buffers to a texture for use with subsequent render passes. To verify that the depth buffer is correctly being rendered to the texture...
I found the problem. I was using glSetUniformf instead of glSetUniformi.
Thanks for the reply, I will remove the enable tags for GL_TEXTURE_2D.
There is a #version tag at the top, denoting version 4. Additionally, I am checking for compile and linking errors, there...
Hello,
I am attempting to get a simple program to work which passes two textures to a shader, and will allow me to switch between the two. Unfortunately, the shader only draws the texture that is...
Hi,
I am starting to learn GLSL, and have been working on a simple tutorial that involves drawing a triangle with different colored vertices. So far however, I have only been able to change the...
Is it possible to use GLUT and GLFW in conjunction? (i.e. Have a program written with GLUT, and has GLFW running along side of it for user input). Or would such a thing be unadvised?
Thanks.
Hello,
I have been trying to find a way for OpenGL to recognize a the use of a single modifier key. The function glutGetModifiers() will only work if some other input is called at the same time.
...
I am not exactly sure... I added code that was in several examples that contained texture mapping. I think this may be what you are asking though, I call these function before loading the textures.
...
Hi,
I am having two issues with some OpenGL code.
One is moving textures on a gluSphere. What I mean by this is, as the camera or object moves around, the texture seems to rotate on the...