Questions tagged [texture]
For questions related to textures: procedural generation, encodings, aspect characterisation, filtering, mapping, storage...
249
questions
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 ...
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.
...
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 ...
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 ...
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)?
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 "...
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?
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 ...
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.
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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?
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 ...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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.
...
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 ...
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 ...
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 ...
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 - ...
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:
...
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. ...