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.

5534 questions
142
votes
3 answers

Differences and relationship between glActiveTexture and glBindTexture

From what I gather, glActiveTexture sets the active "texture unit". Each texture unit can have multiple texture targets (usually GL_TEXTURE_1D, 2D, 3D or CUBE_MAP). If I understand correctly, you have to call glActiveTexture to set the texture unit…
mpen
  • 237,624
  • 230
  • 766
  • 1,119
55
votes
4 answers

Android OpenGL Texture Compression

I need some help finding information (or an example) of how to use texture compression for Android. I have a lot of PNG's right now and I need to reduce the amount of memory they take up. I was looking at PVR compression but I can't figure out how…
Chris
  • 1,696
  • 1
  • 21
  • 35
55
votes
1 answer

Abysmal OpenCL ImageSampling performance vs OpenGL TextureSampling

I've recently ported my volumeraycaster from OpenGL to OpenCL, which decreased the raycaster's performance by about 90 percent. I tracked the performance decrease to the OpenCL's imagesampling functions, which are much slower than the respective…
user1449137
  • 651
  • 5
  • 3
48
votes
8 answers

Simplex noise vs Perlin noise

I would like to know why Perlin noise is still so popular today after Simplex came out. Simplex noise was made by Ken Perlin himself and it was suppose to take over his old algorithm which was slow for higher dimensions and with better quality (no…
42
votes
2 answers

ffmpeg video to opengl texture

I'm trying to render frames grabbed and converted from a video using ffmpeg to an OpenGL texture to be put on a quad. I've pretty much exhausted google and not found an answer, well I've found answers but none of them seem to have worked. Basically,…
Infiniti Fizz
  • 1,696
  • 3
  • 24
  • 38
34
votes
5 answers

Stretch background image for UIButton

I got texture, which really shorter, than my UIButton. I got this texture: And i should create this button: How should i stretch (not tile), this texture? Stretching in horizontal direction Thnx
Eugene Trapeznikov
  • 3,100
  • 6
  • 44
  • 73
32
votes
1 answer

Custom Texture Shader in Three.js

I'm just looking to create a very simple Fragment Shader that draws a specified texture to the mesh. I've looked at a handful of custom fragment shaders that accomplished the same and built my own shaders and supporting JS code around it. However,…
rrowland
  • 2,512
  • 2
  • 13
  • 31
31
votes
1 answer

Multiple transparent textures on the same mesh face in Three.js

Is it possible to lay multiple textures on top of each other on the same face in Three.js so that the alpha blending is done GPU accelerated in webGL? The textures are (or should be) applied to the same face so that the bottom texture (texture 1) is…
Timo Kähkönen
  • 10,897
  • 8
  • 64
  • 105
31
votes
3 answers

glPixelStorei(GL_UNPACK_ALIGNMENT, 1) Disadvantages?

What are the disadvantages of always using alginment of 1? glPixelStorei(GL_UNPACK_ALIGNMENT, 1) glPixelStorei(GL_PACK_ALIGNMENT, 1) Will it impact performance on modern gpus?
ronag
  • 43,567
  • 23
  • 113
  • 204
30
votes
4 answers

Remove paper texture pattern from a photograph

I've scanned an old photo with paper texture pattern and I would like to remove the texture as much as possible without lowering the image quality. Is there a way, probably using Image Processing toolbox in MATLAB? I've tried to apply FFT…
yuk
  • 18,503
  • 9
  • 62
  • 92
29
votes
3 answers

What is the point of an SDL2 Texture?

I'm kind of stuck on the logic behind an SDL2 texture. To me, they are pointless since you cannot draw to them. In my program, I have several surfaces (or what were surfaces before I switched to SDL2) that I just blitted together to form layers.…
Qix - MONICA WAS MISTREATED
  • 12,202
  • 13
  • 73
  • 131
27
votes
3 answers

How to get texture data using textureID's in openGL

I'm writing some code where all I have access to is a textureID to get access to the required texture. Is there any way that I can get access to the RGB values of this texture so I can perform some computations on it? EDIT: I am looking for the…
Sonoman
  • 3,159
  • 9
  • 42
  • 59
26
votes
0 answers

Texture coordinate Cocos3d

Here is how I put my texture on my object : _obj = (CC3MeshNode *)[_world getNodeNamed:@"s0"]; _obj.material.texture = [CC3Texture textureFromFile:@"objTextureLayout.png"]; My object is loaded from 3DMAX and I don't understand why my texture…
klefevre
  • 8,134
  • 7
  • 37
  • 68
25
votes
2 answers

Loading PNG with stb_image for OpenGL texture gives wrong colors

I am using stb_image to load a 32-bit PNG file (RGBA) and I am creating an OpenGL texture with it. It works fine for 24-bit PNG files (with no alpha channel), but when I use a 32-bit PNG file, something goes wrong. This is what the texture should…
developerbmw
  • 3,824
  • 2
  • 24
  • 35
24
votes
3 answers

How to manipulate texture content on the fly?

I have an iPad app I am working on and one possible feature that we are contemplating is to allow the user to touch an image and deform it. Basically the image would be like a painting and when the user drags their fingers across the image, the…
funckymonk
  • 546
  • 1
  • 3
  • 15
1
2 3
99 100