All Questions
Tagged with framebuffer webgl
57
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
1
answer
220
views
Stitch images together in WebGL using a framebuffer
This is something of a follow-up to my question Draw textures to canvas async / in sequence deletes old textures, but with a different approach recommended to me by a friend. I am just learning WebGL,...
1
vote
1
answer
50
views
WebGL color conversion during gl.readPixels()
I'm copying a framebuffer to a pixel buffer object.
Is there a way during the call of gl.readPixels() to go from RGBA to only RED ?
In OpenGL, we can control the glReadPixels() transfer with ...
0
votes
0
answers
75
views
WebGL FrameBuffer gets chopped to size of canvas
I have recently tried to learn WebGL so im trying to make 2d game with tiled map,
most of code that renders sprites are pasted from a guide that I used to learn some basics.
Problem:
It only renders ...
0
votes
1
answer
361
views
GL_INVALID_OPERATION: Only array uniforms may have count > 1. Framebuffer in webgl2
I got it spot light.
I cut most interest part of code. it almost all there related with framebuffer:
App.operation.draws.drawSquareTex = function(object) {
var lighting = true;
// eslint-disable-...
0
votes
1
answer
771
views
WebGL - Rendering to framebuffer instead of to canvas example extended
The Goal
I am trying to extend the WebGL Render to Texture Tutorial to learn WebGL better. So far, I've been able to adjust it so that it renders an image textured-cube instead:
Now, what I'm trying ...
0
votes
1
answer
523
views
WebGL - How do I apply post processing filters to fragment shader output?
My Problem
The source of the problem starts with me trying to apply a "glow" or a "halo" effect to whatever is outputted by the fragment shader.
What I've Tried
The way I found I ...
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, ...
1
vote
1
answer
421
views
How to figure out the maximum number of framebuffers in WebGL
How do I get the maximum number of possibly allocated framebuffers in WebGL? I assume you use getParameter but I don't know what to pass in it. For the maximum amount of color attchements I know I can ...
0
votes
1
answer
296
views
Very Weird Situation With Framebuffers And Uniforms (Unexpected Feedback)
I have this situation with framebuffers which I don't understand at all. Have a look at the following:
class Shader {
constructor(cvs, dim) {
cvs.width = dim[0];
cvs.height = dim[1];
...
1
vote
0
answers
159
views
Framebuffer Attachments In WebGL Producing Unexpected Results
I have a problem with framebuffer attachments. Basically, my framebuffers always worked fine, but for my last project I needed to initialize them with some color values. So I created an attachment ...
2
votes
1
answer
4k
views
WebGL2 : incomplete framebuffer
I'm porting a C++/OpenGL application into WebGL and I'm trying to create and configure a framebuffer.
The framebuffer has 3 textures we can write into of types : vec2, vec2, uint. (gl.RG32F, gl.RG32F, ...
1
vote
0
answers
148
views
Colors in chrome WebGL are slightly different
I write an application with WebGL. In my fragment shader I set constant color to fragment but in my canvas I actually get a slightly different color. For example I write this code to my fragment ...
2
votes
1
answer
1k
views
THREE.js flickering result with Frame Buffer Object
I am working on a scene in THREE.js that uses a Frame Buffer Object. For some reason, I'm seeing a crazy flickering / strobe effect. (The strobe goes away if one comments out the line: mesh.material....
1
vote
1
answer
630
views
Black screen when rendering to a texture
I'm trying to do the following:
Draw the scene in a first pass to a framebuffer I've created.
Take the texture that was attached to the created framebuffer and draw that onto a plane so that it can ...