Hot answers tagged

6 votes
Accepted

Can (and how so) shaders paint screen pixels beyond those that occupied by the shaded mesh?

When you use linewidth or line antialiasing or pointwidth or pointsprites, OpenGL creates for you a small rectangle instead of the line or point, with texture coordinates. Nowadays you can even ...
Fabrice NEYRET's user avatar
5 votes
Accepted

How to use 32 bit Integers for Element Indices in WebGL 1.0?

Enabling the extension is as simple as: var uints_for_indices = gl.getExtension("OES_element_index_uint"); if ...
ratchet freak's user avatar
4 votes
Accepted

What is required to limit the amount of draw calls in Unity?

There's quite a bit of information about this: Static/dynamic batching: basically combining objects into one super-object Atlas textures: combining textures into one large texture than only uses one ...
aces's user avatar
  • 1,353
3 votes

Can (and how so) shaders paint screen pixels beyond those that occupied by the shaded mesh?

One good way you can arrange for a circle (or other shape) to be drawn for each vertex in a mesh is to use geometry instancing. This is a GPU feature that allows multiple instances (copies) of a mesh ...
Nathan Reed's user avatar
  • 24.8k
2 votes
Accepted

Bresenham circle drawing algorithm, compute the distance?

After a short research, I found this site, which describes the algorithm. I didn't know it before. An important thing you didn't mention in your question is the calculation of the decision parameter $...
wychmaster's user avatar
  • 1,233
2 votes

What is the point of having integer-based draw routines in software rasterizer?

The following is really an assorted set of comments: Why integer? Floating-point hardware is (in general) far more complex than integer and so on many (old) CPUs it (a) might not have been available (...
Simon F's user avatar
  • 4,171
2 votes

Blit and scroll

Let's take web browsers as an example. On mobile, both Chrome and Firefox draw the page content on the GPU, and they typically have a lot of scrolling, so it's a relevant example. They work a little ...
Dan Hulme's user avatar
  • 6,700
2 votes

Blit and scroll

Traditionally, there are two ways to display something on the screen: Re-draw it from scratch every frame (or, every time something changes) Track the sections of the screen (ie. "dirty rectangles") ...
RichieSams's user avatar
  • 3,732
2 votes

Hardware-accelerated drawing of curved shapes

You can use OpenGl 4.x tessellation shaders to convert Bezier control points into polygons. A google search for "tessellation shader bezier" found this outline describing the tessellation of Bezier ...
atb's user avatar
  • 121
1 vote

drawing ellipse with rotation cause inaccurate result

I think you should transform your coordinates before checking if they touch the boundary. You seem to use a scatter approach and every pixel that touch the non-transformed ellipse will land on only ...
Mathis's user avatar
  • 129

Only top scored, non community-wiki answers of a minimum length are eligible