79
votes
Sharp Corners with Signed Distance Fields Fonts
EDIT: Please see my other answer with a concrete solution.
I have actually solved this exact problem over a year ago for my master's thesis. In the Valve paper, they show that you can AND two ...
50
votes
Sharp Corners with Signed Distance Fields Fonts
Sorry about the long wait, but it has become obvious that although the article I have promised is basically complete, the publishing process will take some time. Therefore, I have instead prepared an ...
32
votes
How does hardware texture compression work?
"How (hardware) texture compression works" is a large topic. Hopefully I can provide some insights without duplicating the content of Nathan's answer.
Requirements
Texture compression ...
30
votes
Accepted
How can virtual texturing actually be efficient?
Overview
The main reason for Virtual Texturing (VT), or Sparse Virtual Textures, as it is sometimes called, is as a memory optimization. The gist of the thing is to only move into video memory the ...
27
votes
Accepted
How does hardware texture compression work?
As Simon's comment alluded to, one major difference between hardware texture compression and other commonly used image compression is that the former does not use entropy coding. Entropy coding is the ...
22
votes
Accepted
How are mipmap levels computed in Metal?
Mip selection is pretty well standardized across devices today—with the exception of some of the nitty-gritty details of anisotropic filtering, which is still up to the individual GPU manufacturers to ...
19
votes
Accepted
How does Texture Cache work in Tile Based Rendering GPU
Whether it's a tile based GPU or not doesn't really affect the texture cache architecture. The memory layout of texture will look like some flavor of Morton order or Hilbert curve in all GPUs.
As a ...
17
votes
Accepted
How does Texture Cache work considering multiple shader units
At the top level, a GPU is subdivided into a number of shader cores. A small GPU in a notebook or tablet may have only a few cores while a high-end desktop GPU may have dozens.
In addition to the ...
16
votes
Accepted
How does mip-mapping work with non-power-of-2 textures?
The rule is that to compute the next mipmap size, you divide by two and round down to the nearest integer (unless it rounds down to 0, in which case, it's 1 instead). For example, a 57x43 image would ...
16
votes
How is anisotropic filtering typically implemented in modern GPUs?
The texture filtering hardware takes several samples of the various mipmap levels (the maximum amount of samples is indicated by the anisotropic filtering level, though the exact amount of samples ...
16
votes
Accepted
Is using many texture maps bad for caching?
Just adding to imallett's answer, it is true that increasing the number of accesses to different texture data in a shader will increase pressure on the GPU cache(s), but there are several other ...
16
votes
Accepted
Are lookup textures still used for anything?
Yes, lookup textures are still used. For example, pre-integrated BRDFs (for ambient lighting, say), or arbitrarily complicated curves baked down to a 1D texture, or a 3D lookup texture for color ...
15
votes
Accepted
Performance of vector graphics versus bitmap or raster graphics
As TheBuzzSaw said, it does depend on lots of things, including implementations of the rasterized graphics vs the vector graphics.
Here are some high performance vector graphics methods that are ...
14
votes
How can virtual texturing actually be efficient?
Virtual Texturing is the logical extreme of texture atlases.
A texture atlas is a single giant texture that contains textures for individual meshes inside it:
Texture atlases became popular due to ...
13
votes
Changing image so it would look like through colorful glasses
(XYZ) can be the RGB colour you want to tint your scene by. For the above scene it can be a red colour (1.0, 0.0, 0.0) or something similar with a strong red component.
Bear in mind that since you ...
12
votes
Accepted
Algorithms for down sampling an image?
When Sean and I wrote stb_image_resize we chose Mitchell for downsizing. Mitchell is similar to Cubic, you can read about the cubic class of sampling filters in Mitchell Netravali 1988. They are all ...
12
votes
Accepted
Is it good practice to use all the available texture units?
Modern hardware doesn't really have the concept of texture binding points as exposed by OpenGL. Rather, the shader unit uses a descriptor (which is just some kind of fat pointer) which can potentially ...
12
votes
Accepted
How to do texturing with OpenGL direct state access?
You still have to bind the desired texture to the texture unit to use it for rendering. In your current code, you're not specifying which texture to use for rendering, so the GL driver doesn't know ...
12
votes
Accepted
Help me grasp Anisotropic Filtering (AF)
To understand the nature of anisotropic filtering, you need to have a firm understanding of what texture mapping really means.
The term "texture mapping" means to assign positions on an object to ...
11
votes
Accepted
Is modifying a texture (painting on it) considered a "state change"?
Updating an area of memory in the graphics device (a texture, buffer, and the like) is not quite the same as changing a rendering state.
What makes a render state change expensive is the amount of ...
10
votes
Accepted
Perspective Correct Texture Mapping
You are on the right track but what you need to do is to calculate u/w and v/w, and also 1/w for each vertex, which you interpolate linearly in screen space in your rasterizer. Then for every pixel ...
10
votes
Accepted
Seamless Textures
For these types of algorithms, you usually have to rely on multiple forms of texture synthesis. That doesn't mean you have to generate the whole texture from scratch. For example, you could regenerate ...
9
votes
How is anisotropic filtering typically implemented in modern GPUs?
The API requirements can be found in any of the specs or extensions. Here is one: https://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt
All GPU vendors likely deviate from the spec ...
9
votes
Accepted
16bit half-float linear HDR images as (diffuse/albedo) textures?
In film production, we almost never use 8-bit textures for color/albedo, because of banding, etc. (JPEG is especially problematic since by spec, it's sRGB rather than linear values.) We either use '...
8
votes
Accepted
Help me find out what this texture mapping technique is called
What you see in the image called a UV map. That is, it is simply texture coordinates to be looked up encoded in a image. Same thing happens in all texture lookup in 3D there is a underlying sampler ...
8
votes
Is using many texture maps bad for caching?
The answer depends on what you mean. Modern hardware (e.g. with bindless textures) really doesn't care too much how many textures are "bound". The real question is how many you use.
Textures ...
8
votes
Performance of vector graphics versus bitmap or raster graphics
There might be.
Less technical answer:
If you're building a website or another application where you have nothing to do with the graphics programming then the answer is probably yes. The underlying ...
8
votes
Accepted
Is a cubic Lagrange interpolation tensor product the same as bicubic interpolation?
It turns out that no, while you can use bicubic Lagrange interpolation for bicubic texture sampling, it isn't the highest quality option, and probably not actually likely to be used.
Cubic hermite ...
8
votes
Accepted
Sine-based Tiled Procedural Bump
As you are taking the mean of a number of sine waves, your colour values will range from -1 to 1. From your example image, it looks like only the top half of this range of values (from 0 to 1) is ...
8
votes
16bit half-float linear HDR images as (diffuse/albedo) textures?
Yes, it's possible in some extreme cases for HDR lighting and tonemapping to expose banding issues in color textures. In those cases, having a higher bit depth for the textures could be useful. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
texture × 249opengl × 87
uv-mapping × 30
shader × 28
rendering × 23
glsl × 20
3d × 15
algorithm × 13
3dtexture × 13
sampling × 11
hlsl × 10
mapping × 10
image-processing × 9
mesh × 9
gpu × 9
filtering × 9
mipmap × 9
lighting × 8
normal-mapping × 8
raytracing × 7
c++ × 7
interpolation × 7
mathematics × 6
webgl × 6
performance × 5