Skip to main content

All Questions

Tagged with
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 ...
Yuval A.'s user avatar
  • 6,049
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 ...
Krapow's user avatar
  • 641
-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 ...
BackSpace7777777's user avatar
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, ...
daumann's user avatar
  • 37
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 ...
leechmasterb's user avatar
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-...
billvh's user avatar
  • 57
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 ...
killexe's user avatar
  • 457
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 ...
Rhu Mage's user avatar
  • 697
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 ...
sdasdadas's user avatar
  • 24.7k
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 ...
Tobi M. Ottorony's user avatar
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 ...
Manh Nguyen's user avatar
-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 ...
hando's user avatar
  • 1
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 ...
Arka Roy's user avatar
  • 180
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 ...
Makogan's user avatar
  • 9,191
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 ...
Simon Müller's user avatar

15 30 50 per page