Questions tagged [texture]

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

Filter by
Sorted by
Tagged with
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
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
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
4 votes
1 answer
676 views

What happened to my texture mapping?

Recently, I am writing a simple software rasterizer for self-studying and fun. But the texture mapping has problems. The texture I want to map is below: But the final image of two triangles is ...
alexunder's user avatar
  • 141
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
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
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
4 votes
2 answers
1k views

MipMaps for Signed Distance Field

Is there some algorithm that keeps details when creating mipMaps for SDF? For example group of 4 pixels when only one is above threshold will lose this pixel with bilinear and creating mipMaps with '...
Derag's user avatar
  • 596
3 votes
1 answer
260 views

setting up integer texture and binding as image pt. 2

Made a new question as suggested, follow up to that one. I was experimenting with texture declaration to find solution and thats how I done that before (...
mdkdy's user avatar
  • 2,119
3 votes
1 answer
2k views

How to dynamically calculate texture coordinates in a vertex shader with OpenGL?

I modified my code, and tried to pass a set of integers specifying the face of a cube (top, bottom left...) to the vertex shader in order to draw multiple instances of a cube face. I did this by ...
Makogan's user avatar
  • 1,696
3 votes
2 answers
3k views

Setting up integer texture and binding as image

When I set up a texture as float it works (color is written - BTW I'm doing voxelization): ...
mdkdy's user avatar
  • 2,119
1 vote
1 answer
57 views

Conditionally sample from texture in shader

I'm building a little 2D graphics library in Rust/WGPU as a means to learn graphics programming. I want to draw an outline around a shape and specify the outline's color. All of my shapes have a ...
junglie85's user avatar
  • 125
1 vote
1 answer
3k views

How do you load multiple textures into an array texture with OpenGL?

I have been reading the OpenGL documentation but it is not clear to me how to achieve the following. Say we have an array of strings. Each string in the array is a valid relative path to an image ...
Makogan's user avatar
  • 1,696