Questions tagged [textures]

Textures are series of images used in computer graphics to associate locations on a visible surface with varying values. This association is typically done by mapping locations on the texture (usually two-dimensional, but other dimensions and types of textures exist) to locations on the rendered surface. Filtering is often used to smooth away aliasing when sampling values from the texture, usually involving multiple images within a texture called mipmaps.

In 3D graphics, the digital representation of the surface of an object. In addition to two-dimensional qualities, such as color and brightness, a texture is also encoded with three-dimensional properties, such as how transparent and reflective the object is. Once a texture has been defined, it can be wrapped around any 3-dimensional object. This is called texture mapping.

Well-defined textures are very important for rendering realistic 3-D images. However, they also require a lot of memory, so they're not used as often as they might be. This is one of the rationales for the development of the new graphics interface, AGP, which allows texture to be stored in main memory, which is more expansive than video memory. AGP also speeds up the transfer of large textures between memory, the CPU and the video adapter.

5888 questions
2
votes
2 answers

Is it faster to use texelFetch when rendering fonts?

I am writing some font drawing shaders in OpenGL 3.3. I will render my font into a texture atlas and then generate some display lists for some text I want to draw. I would like the rendering of text to consume the least amount of resources (CPU,…
Neil G
  • 32,138
  • 39
  • 156
  • 257
2
votes
2 answers

what is need of integer and SNORM textures

What is the advantage or need of integer and SNORM textures? when do we use (-1,0) range for textures? Any example where we need specifically integer or SNORM textures?
debonair
  • 2,505
  • 4
  • 33
  • 73
2
votes
1 answer

Alpha/texturing issues in an OpenGL wrapper

I'm in the process of writing a wrapper for some OpenGL functions. The goal is to wrap the context used by the game Neverwinter Nights, in order to apply post-processing shader effects. After learning OpenGL (this is my first attempt to use it) and…
ssube
  • 47,010
  • 7
  • 103
  • 140
2
votes
3 answers

Three.js partially stretched texture

I am using the Collada loader to load my 3D object in Three.js r65. And at the loading callback I apply immediatly a texture to all parts of the model with the following code. var loader = new THREE.ColladaLoader(); loader.options.convertUpAxis =…
Mandy Schoep
  • 942
  • 11
  • 19
2
votes
1 answer

Repeat Image along x axis in libgdx game for Android

I am implementing one game where I want to repeat one image along x direction.I searched for it on the web but could not get the correct approach. There is a grass image and I want to repeat it all along the ground in x direction. Kindly provide…
Jigar Pandya
  • 2,129
  • 2
  • 17
  • 27
2
votes
1 answer

OpenGL ES 2.0 - read texture value (like with texelFetch)

I have a look up texture as red channel (R8). I upload it to Pixel Shader and there I want to read pixel value (range 0 - 255) and use value for indexing an array of colors. Texture is non-power of two. If I do float v = texture2D(s, c).r; int index…
Martin Perry
  • 9,232
  • 8
  • 46
  • 114
2
votes
2 answers

Direct3D Sprite->SetTransform usage?

I draw textures using the D3DXSprite. I want to transform them(rotate, scale etc..) so I use the SetTransfrom method. Should I, store the old transformation -> set a new one -> draw -> set the old one? I have a sprite class whice take care of the…
Adir
  • 1,423
  • 3
  • 19
  • 32
2
votes
1 answer

Layering textures on terrain in three.js

I have a large terrain, and I would like to lay a low-resolution satellite image across the whole thing. Then, in areas near the user, I would like to blend in a higher resolution texture of terrain features. Is texture splatting the best way to do…
Eric
  • 1,414
  • 3
  • 16
  • 35
2
votes
1 answer

Android drawing texture with OpenGL ES 2.0 slow on some devices

In my Android 4.3 application, I would like to load a texture from a local png onto a TextureView. I do not know OpenGL and I am using the code from the GLTextureActivity hardware acceleration test. I am pasting also the loading texture part here: …
drgr
  • 43
  • 8
2
votes
2 answers

What compressed texture formats are supported on iOS?

Coming from a Windows background, the only compressed file format I'm used to is DDS, which uses S3 DXT compression. I'm unsure if DDS is supported on iOS devices, and what other options there might be? I've heard of things like Ericsson Texture…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
2
votes
0 answers

OpenGL - Defining repeating texture coordinates for vertex buffer object

Problem When using a vertex buffer objects to draw textured primitives, we have to define a separate buffer to store a list of texture coordinates at each vertex. This texture coordinate array has to map to each vertex in the VBO, thus, we need a…
Skul
  • 303
  • 1
  • 6
  • 19
2
votes
2 answers

Read back texture coordinates from rendered image in OpenGL?

If I render a scene in openGL, is it possible to get back the texture coordinates that were used to paint that pixel? For example, if I render a triangle that has 3 vertices (x,y,z) and 3 tex coords (u,v), and then I select a pixel on the triangle,…
Bobby Pardridge
  • 267
  • 6
  • 16
2
votes
1 answer

OpenGL ES texture atlas distortion

I am trying to tile area with texture atlas and specific shaders but I get weird behavior on different devices. Most of them (Samsung Galaxy Ace, Samsung Galaxy Gio etc) are ok, just bleeding occurs (hope I can fix it with half-pixel…
AskT
  • 66
  • 1
  • 2
  • 8
2
votes
2 answers

Texture coordinates for a programmatically generated TriangleMesh in JavaFX

My program reads in an ASCII encoded .stl file and parses it to a TriangleMesh, in order to display it on the screen. It works fine as long as I only want a single colour for the entire geometry. But now I want to be able to assign different colours…
2
votes
1 answer

OpenGL shaders: uniform variables count incorrect

I want to do bump/normal/parallax mapping but for this purpose I need multitexturing - use 2 textures at a time - one for the color and one for the height map. But this task accomplishment appeared absurdly problematic. I have the following code for…
Ivan Caravanio
  • 597
  • 1
  • 7
  • 20