Questions tagged [texture]

For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...

Filter by
Sorted by
Tagged with
54 votes
5 answers
26k views

Sharp Corners with Signed Distance Fields Fonts

Signed Distance Fields (SDFs) was presented as a fast solution to achieve resolution independent font rendering by Valve in this paper. I already have the Valve solution working but I'd like to ...
Felipe Lira's user avatar
  • 1,236
38 votes
2 answers
22k views

How can virtual texturing actually be efficient?

For reference, what I'm referring to is the "generic name" for the technique first(I believe) introduced with idTech 5's MegaTexture technology. See the video here for a quick glance on how it works. ...
Llamageddon's user avatar
22 votes
3 answers
4k views

Performance of vector graphics versus bitmap or raster graphics

Sometimes I use vector graphics, simply because they look just slightly nicer in some cases, and other times, I use bitmap/raster graphics. I was wondering, are there any significant performance ...
Ethan Bierlein's user avatar
17 votes
2 answers
7k views

How is anisotropic filtering typically implemented in modern GPUs?

Anisotropic filtering "retains the sharpness of a texture normally lost by MIP map texture's attempts to avoid aliasing". The Wikipedia article gives hints about how it can be implemented ("probe the ...
wip's user avatar
  • 1,851
16 votes
2 answers
4k views

How does hardware texture compression work?

That it compresses the data compared to the pixel array is obvious. But what makes it different from from normal compression (like png, jpeg)?
ratchet freak's user avatar
16 votes
1 answer
5k views

How are mipmap levels computed in Metal?

My question is specifically in regards to Metal, since I don't know if the answer would change for another API. What I believe I understand so far is this: A mipmapped texture has precomputed "...
lcmylin's user avatar
  • 413
16 votes
2 answers
6k views

How does mip-mapping work with non-power-of-2 textures?

I have heard that recent GPUs all support non-power-of-2 textures and all features just work. However, I don't understand how mip-mapping would work in such a scenario. Can someone explain?
ap_'s user avatar
  • 2,194
15 votes
1 answer
904 views

Are lookup textures still used for anything?

I know in the not so long ago (5-10 years?) that it was popular / efficient to bake data out into textures and then read the data from the textures, often using the built in texture interpolation to ...
Alan Wolfe's user avatar
  • 7,751
13 votes
1 answer
5k views

How does Texture Cache work considering multiple shader units

Modern GPUs have many parallel shading units. I'd like to know how texture cache is managed in that scenario.
Felipe Lira's user avatar
  • 1,236
13 votes
2 answers
3k views

Derivative maps vs. Tangent Space Normal maps

I discovered that some engines use derivative maps instead of tangent space normal maps. After some reading, it seems to be a really awesome way to replace tangent space normals but are there some ...
MaT's user avatar
  • 1,219
12 votes
1 answer
771 views

Is modifying a texture (painting on it) considered a "state change"?

The convention in graphics is that performing fewer state changes is better than performing more state changes (switching shaders, binding buffers, binding textures, etc.). For textures, it is faster ...
TheBuzzSaw's user avatar
12 votes
1 answer
732 views

Is a cubic Lagrange interpolation tensor product the same as bicubic interpolation?

I just implemented some interpolated texture sampling by sampling the 4x4 nearest pixels then doing Lagrange interpolation across the x axis to get four values to use Lagrange interpolation on across ...
Alan Wolfe's user avatar
  • 7,751
11 votes
2 answers
2k views

Is using many texture maps bad for caching?

If I have many textures (say 5+ maps) bound to the same texture unit, does it work worse for cache than if I had only 2 or 3 textures?
Felipe Lira's user avatar
  • 1,236
11 votes
3 answers
2k views

16bit half-float linear HDR images as (diffuse/albedo) textures?

So I been thinking about this for a while and tried to google for an answer but without any success. If all your textures are 8bit LDR images, like JPEGs, couldn't that potentially cause conflicts ...
Kristoffer Helander's user avatar
11 votes
2 answers
917 views

Are textures automatically Morton-coded when loaded to VRAM?

I know that texture caching on GPU works to optimize locality in 2D (or 3D if using 3D textures). I believe this is done using space-filling curves like Morton or Hilbert curves. When passing an ...
russ's user avatar
  • 2,372
11 votes
1 answer
2k views

Algorithms for down sampling an image?

Bicubic sampling is pretty good for up sampling an image and making it larger, but is it a good choice for down sampling as well? Are there better choices?
Alan Wolfe's user avatar
  • 7,751
11 votes
1 answer
347 views

Choosing width of data for signed distance field texture

A signed distance field texture is a technique where you store the distance from a pixel to the surface of a shape within the color information for that pixel, allowing almost vector graphics quality ...
Alan Wolfe's user avatar
  • 7,751
10 votes
3 answers
5k views

How to do texturing with OpenGL direct state access?

How do you use textures with direct state access in OpenGL? I have the following in my code, which seems to work: ...
LinAGKar's user avatar
  • 183
10 votes
1 answer
2k views

How does Texture Cache work in Tile Based Rendering GPU

How does cache work with tile based rendering? Are there any tips on how to improve cache hit ratio for it? (for instance, if tiles are processed horizontally and I have vertical segments of ...
Felipe Lira's user avatar
  • 1,236
10 votes
1 answer
2k views

Is it good practice to use all the available texture units?

When applying multiple textures to a mesh, like for bump-mapping, I usually bind the textures to the first few fixed texture units, e.g.: diffuse = unit 0, bump = unit 1, specular = unit 2, then keep ...
glampert's user avatar
  • 1,459
10 votes
1 answer
514 views

Do you need to use a lowpass filter before downsizing an image?

Apparently bicubic pixel interpolation is good for scaling up or down an image (in real time or not). Is it recommended to use a lowpass filter before downsizing though, or does the bicubic sampling ...
Alan Wolfe's user avatar
  • 7,751
10 votes
1 answer
443 views

Map a texture onto a hyperbolic triangle

I've been stuck on how to approach this for a while, so any suggestions would be gratefully appreciated! I want to map a texture in the form of a lower right euclidean triangle to a hyperbolic ...
Lewy Blue's user avatar
  • 203
9 votes
1 answer
221 views

Help me find out what this texture mapping technique is called

I'm in the process of making a tool that requires rendered texture to follow the contours of a piece of clothing. An example would be this website https://knyttan.com/editor/jumper-editor/. The effect ...
Lukas Kriaučiūnas's user avatar
9 votes
2 answers
316 views

How to create a patterned object with variable pattern density in real-time?

Assume there is some value p, calculated per-frame, that varies continuously over the surface of an object. The value of p ...
Ryan's user avatar
  • 201
9 votes
1 answer
340 views

Perturbed image texture implementation from renderman language

I am trying to implement (in C#) an image perturbation algorithm presented in the book "Texturing and modeling - K. Perlin et al" (page 91 if anyone has it), which distorts an image. The following ...
simog's user avatar
  • 91
9 votes
1 answer
564 views

Can we use anisotropic filtering on 3D textures?

Do modern GPUs support anisotropic filtering for 3D textures? If yes, how can one use it? The OpenGL spec doesn't seem to be very precise on this. From this link: ...
ap_'s user avatar
  • 2,194
9 votes
1 answer
2k views

Writing to a compressed texture using a compute shader, with no extra copies

I'm trying to figure out what the best way is to generate an OpenGL texture using a compute shader. So far, I've read that pixel buffer objects are good for non-blocking CPU -> GPU transfers, and that ...
Mokosha's user avatar
  • 1,144
8 votes
3 answers
311 views

Changing image so it would look like through colorful glasses

I am currently working on some simple pixel shader in HLSL. I send to shader texture and I want to make it more colorful (something like in the picture below). In the picture 1 there is original ...
bartosz.baczek's user avatar
8 votes
2 answers
1k views

Help me grasp Anisotropic Filtering (AF)

Lately I've been reading about texture filtering, namely Nearest-neighbor filtering, Bilinear filtering, Trilinear filtering, Anisotropic filtering, MIP maps, RIP Maps and so on. From a high-level ...
Nicola Masotti's user avatar
8 votes
1 answer
5k views

Perspective Correct Texture Mapping

So I'm trying to correctly map my textures in my software renderer using the u, v coordinates but I can't seem to get it working. I got affine texture mapping working. This is what I can produce using ...
Andrew Wilson's user avatar
8 votes
2 answers
1k views

Moires patterns despite using mipmaps

I am working on Silverlight app. I am trying to render floor covered with tiles. Although I am using mip maps I am still getting awful Moire patterns, when trying to render big area. What I am doing ...
bartosz.baczek's user avatar
7 votes
1 answer
2k views

What's the difference between Sample and tex2D

I am mainly using Unity but I think that it's not related to this engine, and I am wondering what's the difference between using tex2D and ...
MaT's user avatar
  • 1,219
7 votes
2 answers
751 views

Does normal mapping make sense for a view of earth from space?

I am working on a planet visualizer, which at this point is little more than the NASA blue marble image applied as a diffuse texture. For the atmospheric rim, I am simply blending in a constant color ...
user avatar
7 votes
1 answer
2k views

Ray tracing - partial derivatives for texture lookup

I'm doing some ray tracing on GPU using a fragment shader... How can I calculate texture coordinates partial derivatives with respect to screen coordinates so I could perform filtered texture lookup ...
zduny's user avatar
  • 377
7 votes
1 answer
3k views

What happens when you display a high resolution image on a low resolution screen?

For a non-computer graphics expert, what happens technically when you do this? Are multiple pixels merged to one to compensate for the lower resolution? And in how far will this affect the image ...
AdHominem's user avatar
  • 173
7 votes
0 answers
251 views

Supersampling HDR

I'm encountering some issues supersampling in HDR for an SDR result and was curious what the usual method for doing this is. Notice how pixelated the edge of the white sphere is. Here's how I render ...
Alan Wolfe's user avatar
  • 7,751
7 votes
0 answers
707 views

Perspective-Correct Texture Mapping

I am working on a small rendering engine for a personal project and I am having issues with the texture mapping part of it. It seems to work for some cases, but not for others. For example, when one ...
neat's user avatar
  • 71
6 votes
3 answers
4k views

Gaussian blur with transparency

I made a convolution testing program for experimenting with stuff. I've created a 5x5 Gaussian kernel for blurring. Everything looked fine, then I tried to blur a transparent png with a white circle ...
Rothens's user avatar
  • 191
6 votes
1 answer
2k views

Seamless Textures

I understand how an artist would make seamless textures by hand, but how can a computer program automate that process? Software like PixPlant is capable of doing this, but I don't understand how it ...
Daniel Kareh's user avatar
6 votes
1 answer
442 views

Texture glitch when using simple pixel shader

I have an issue with rendering my textures in Silverlight. When I look at it from above everything looks fine: But if I only change angle of watching it it looks terrible: I am using very simple ...
bartosz.baczek's user avatar
6 votes
1 answer
214 views

CrazyBump Shape Recognition

I've recently been using CrazyBump, and I think I'm starting to understand how it works. But I'm confused about what it calls Shape Recognition. According to this website, that feature attempts to add ...
Daniel Kareh's user avatar
6 votes
0 answers
1k views

OpenGL texelFetch causes black stripes

THE SHORT VERSION In my fragment shader I'm reading (using texelFetch) multiple times the same texel from a texture (created by another fragment shader) and write it to the output render buffer. ...
Christian_B's user avatar
6 votes
0 answers
912 views

Drawing to framebuffer texture - texture then split in half

I am doing exercises from the OpenGL SuperBible 6th Ed. I have managed to set up rendering into a framebuffer texture and then rendering from that texture to a cube. But for some reason, when the ...
Paweł Pela's user avatar
5 votes
1 answer
2k views

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. ...
J.Doe's user avatar
  • 1,445
5 votes
2 answers
229 views

What is missing in this image that stops it from looking like a photograph?

Look at this image: This is CG, Saya, a project meant to make as real CG as possible to the point of becoming indistinguishable from reality. I would say that it is pretty believable. But, it still ...
Bagnette's user avatar
5 votes
1 answer
302 views

Sine-based Tiled Procedural Bump

I am trying to implement this formula to generate bump but I am facing some issue. The result doesn't look the same it's much darker. Here is my result (without same parameters) but it is much darker ...
MaT's user avatar
  • 1,219
5 votes
1 answer
606 views

Performance impact during texture layer loading

Recently I have been having a rather confusing performance drop with loading in layers of a 2D texture array, but only in one case from what I can tell, leaving me to speculate on why it is happening ...
Lemon Drop's user avatar
5 votes
1 answer
1k views

Kaiser windowed sinc filter for mip mapping

These older but informative article talks about how a Kaiser windowed sinc filter is a good way to generate mips. The Inner Product - Mipmapping - Part 1 | Jonathan Blow The Inner Product - ...
Alan Wolfe's user avatar
  • 7,751
5 votes
2 answers
147 views

Problem with Basic Diffuse Lighting

So recently I have been learning how to implement Diffuse Lighting in DirectX and I have done so with the following code: ...
Arjan Singh's user avatar
  • 2,491
5 votes
1 answer
2k views

What happens to float values written to UNSIGNED_BYTE texture?

This is more a theoretical question. I'm wondering what happens when I write float values into an empty RGBA texture of type gl.UNSIGNED_BYTE in WebGL 1.0. ...
Muad's user avatar
  • 165

1
2 3 4 5