All Questions
Tagged with framebuffer shader
32
questions
0
votes
1
answer
49
views
Default render color vector for fragment shader when using a frame buffer with multiple attachment?
ChatGPT insists that when using a framebuffer and attaching multiple draw buffers, the 0-indexed one will be the one that when you write to in the shader, it will be rendered on the canvas. However I ...
0
votes
0
answers
52
views
android openGL ES blur effect gives line on screen
I am trying to implement a post-processing blur effect on a map drawn using openGL on my android app project.
What I try to do is render my map in a texture, then render the texture on screen using a ...
-1
votes
1
answer
97
views
Framebuffer object picking
I am trying to use a frame buffer for object picking and trying to use stbi_write_png to see what i'm rendering as this frame buffer is not going to be rendered to the screen. I want to use unsigned ...
0
votes
0
answers
239
views
WebGL (1) rendering to a texture results in: "GL_INVALID_FRAMEBUFFER_OPERATION: Draw framebuffer is incomplete"
Using this helper function we initilize framebuffer and texture:
protected _createTextureAndFramebuffer(gl, width, height, data) {
const tex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, ...
2
votes
1
answer
1k
views
Render to Framebuffer/texture shows empty
I am trying to render to a framebuffer (with the same size as the window/screen) for post processing. Everything is in 2D so it should not give much trouble. Rendering directly to the screen works ...
3
votes
1
answer
1k
views
WebGL2 -- How to store and retrieve 3D texture data needed by 3D grid of vertices to calculate new vertex positions
3D Physics simulation needs access to neighbor vertices' positions and attributes in shader to calculate a vertex's new position. 2D version works but am having trouble porting solution to 3D. Flip-...
0
votes
0
answers
486
views
Find out which triangles were drawn OpenGL
I have an idea and I want to know if this would be possible in any way. I want to render a scene and use the resulting image to find out which triangles were or are visible from my current point of ...
1
vote
1
answer
314
views
Selectively drawing to some outputs in shaders
I have a framebuffer object with 2 outputs:
layout(location = 0) out vec4 color;
layout(location = 1) out uint object_id;
In my shader I also receive a boolean value, which tells me if I should ...
0
votes
1
answer
186
views
OpenGL Framebuffer Missing Faces
I'm having an issue using OpenGL to implement multi-pass shaders to enable HDR.
The first pass renders the scene to a framebuffer.
The second pass uses the framebuffer with color and depth to render ...
1
vote
1
answer
715
views
OpenGL Framebuffer ColorAttachment to Compute Shader
I want to put the Color Attachment of my custom framebuffer into a compute shader for simple image processing, but I am getting a black screen only.
Here is my example code
Creating color attachment
...
10
votes
1
answer
8k
views
Concept: what is the use of glDrawBuffer and glDrawBuffers?
I am reading the red book OpenGL programming guide when I come across these two methods, which strikes me as unnecessary since we already can specify which color buffer the output is going to go to ...
-1
votes
1
answer
560
views
glReadPixels is not working with GL_FLOAT
I'm using OpenGL shader and trying to print the color values.
So, I used glReadPixels function. It is working with GL_UNSIGNED_BYTE but not with GL_FLOAT.
Is there anything else should I do?
This ...
2
votes
0
answers
1k
views
WebGL render to texture with framebuffer
I am new in webgl and trying to learn it.
I am trying to learn framebuffer and rendering to texture but I am stuck.
What I am trying to do is to copy the colors (pixel data) of a texture to another ...
0
votes
1
answer
432
views
Monochrome rendering in OpenGL to frambuffer object?
Is there a way to render monochromatically to a frame buffer in OpenGL?
My end goal is to render to a Cubic texture to create shadow maps for shading in my application.
From what I understand a way ...
1
vote
1
answer
1k
views
Texture does not fit in the square - OpenGL
I am trying to create a square and put a red circle middle of it. As you can see in the simple vert I map (-1, 1) range to (0,1) range:
coord = position.xy*0.5 + vec2(0.5,0.5);
If you look at the ...