New answers tagged

1

For a diagram to be comprehensive, it'd have to show way too much detail. It's just a simple tool. Primitive assembly is the process of taking a sequence of vertices for a particular rendering primitive type, and generating a sequence of base primitives (points, lines, triangles) from them. This process does indeed happen after vertex post-processing, as the ...


1

A VBO is a buffer of memory which the gpu can access. That's all it is. A VAO is an object that stores vertex bindings. This means that when you call glVertexAttribPointer and friends to describe your vertex format that format information gets stored into the currently bound VAO. And when you draw it will use the vertex bindings in the currently bound VAO. ...


1

How can we render the scene around the light by rendering it onto a sphere? Well, answer me this: how do you render a scene around a like by rendering a "screen quad"? We're ultimately talking about deferred rendering, and what is being done is rendering the lighting pass. During the lighting pass, you read data from the gbuffers that tell you ...


2

So my understanding of VBO they're essentially Buffer objects (bunch of bytes to be sent to the GPU) with the difference that VBO are specifically dedicated to Vertex Data. Is this correct? A "VBO" is not really a thing, and I really wish tutorials would stop pretending that they are. You are correct in that there exist buffer objects. These are ...


0

a quick working wrapper for OpenGL from R: require(rgl) tr.points <- matrix(c(1,0,0, cos(60/180*pi),sin(60/180*pi),0, 0,0,0), ncol=3, byrow=TRUE) triangles3d(tr.points, col=c('red', 'green', 'blue'), lit=FALSE, smooth=TRUE, textype='rgb', lwd=1.0, depth_mask=TRUE, depth_test='always') rgl.viewpoint(...


1

Most 2D graphics programs are able to do linear gradients with arbitrary orientations. If you don't mind a little work, it is possible to set this up to imitate the 2D linear interpolation across a triangle. Set up two layers: Pick two of the colors, say red and green, and set up a linear gradient between those two colors along the red-green edge. In a ...


3

The standard solution is to reduce the amount of per-vertex data by only specifying the 4 indices that have the highest weights (and rescaling the weights to add up to 1.0). That way, you can pass 4 weights as a vec4 and 4 indices as a uvec4. Also, you should pass the weights as normalized shorts (or bytes if you can accept the quality loss) and indices as ...


1

The tessellation limit is GPU dependent..Any number above the GPU limit is technically an error but most gpu's just clamp to the upper limit. To get beyond the limit either use a Level Of Detail (LOD) approach where you have different models that are used based on distance, or save and recompute like you suggest. To get the max just set all the edges to the ...


2

I copied my answer for the same OP at https://github.com/godotengine/godot/issues/19473. But this question differs slightly to the original issue report. In case you want to manually add support for VERTEX_ID, these are the changes I had to make in 3.2.3-stable for spatial shaders. I wanted to use the vertex ID for creating procedural animations. In drivers/...


0

I'd like to know what is wrong with my approach of two index buffers, and a single vertex buffer. There is nothing wrong with that. Reusing resources and avoiding duplicate data is always a good thing. Why isn't it working? What am I missing? Basically, you already got the answer: " I read I might use VAO" In the Vertex Array Object section of ...


Top 50 recent answers are included