Questions tagged [multitexturing]

Multitexturing is the use of more than one texture at a time on a polygon.

Multitexturing is the ablility to apply two or more textures (most modern graphics cards can do 8 textures) to the same primitive in a single pass.

60 questions
6
votes
1 answer

Any undersandable description of glTexEnvi (OpenGL ES 1.x)?

I've seen as many different parameters as many source codes I saw. Is there a description can be found somewhere that refers all about those parameters in details?
Geri Borbás
  • 15,810
  • 18
  • 109
  • 172
6
votes
1 answer

OpenGL 3.3 multitexture: GL_TEXTURE1 and following are always black (Only GL_TEXTURE0 works fine)

Every texture after GL_TEXTURE0 (texture on slot 0) is black. Fragment shader (sample code to check different textures by changing weights): #version 330 uniform sampler2D g_ColorTex; uniform sampler2D g_DepthTex; uniform sampler2D…
Tobias
  • 427
  • 4
  • 19
5
votes
1 answer

How is texture data accessed on the GPU in OpenGL?

I don't fully understand the way texture data is accessed on the GPU. If possible - could anyone explain these? When the number of texture units is limited, does this limit the number of textures I can generate using glGenTextures() and upload to…
5
votes
1 answer

OpenGL, GL_MODULATE and Multitexturing

I have successfully drawn a multi-textured polygon but unfortunately only the first pixel of the overlaying texture is being used across the entire texture area. Here are the textures (GL_TEXTURE0 and GL_TEXTURE1): The result is this: Only the…
Aram Kocharyan
  • 20,165
  • 11
  • 81
  • 96
5
votes
1 answer

OpenGL ES 1 multi-texturing with different uv coordinates

I need to render an object using multi-texturing but both the textures have different uv coordinates for same object. One is normal map and other one is light map. Please provide any useful material regarding this.
rocksvick
  • 187
  • 2
  • 7
5
votes
4 answers

OpenGL Multitexturing - glActiveTexture is NULL

I have started a new project, which I want to use multitexturing in. I have done multixexturing before, and is supported by my version of OpenGL In the header I have: GLuint m_TerrainTexture[3];//heightmap, texture map and detail map GLuint …
Tim Orton
  • 329
  • 3
  • 14
5
votes
2 answers

OpenGL: Turn off multiple texture units

How to turn off multiple texture units because they influence to other render parts. I activate my them: glActiveTexture(GL_TEXTURE0 + index); glBindTexture(GL_TEXTURE_2D, …
itun
  • 3,439
  • 12
  • 51
  • 75
5
votes
1 answer

LibGDX SpriteBatch Multitexture possible?

I'm happily using the SpriteBatch class of the LibGDX Framework. My aim is to modify the representation of the sprite through a shader. batch = new SpriteBatch(2, shaderProgram); I copied the default shader from the SpriteBatch Class and added…
fky
  • 222
  • 2
  • 11
4
votes
2 answers

How to create a "scorched area" on a 3D terrain?

i'm experimenting a bit with C# and XNA. Going through the advanced "Riemers tutorials" helped me a lot, but i want to make my terrain even better. I have a simple game where player controls a tank and destroys other buildings and tanks. I would…
PeterK
  • 6,287
  • 5
  • 50
  • 86
4
votes
1 answer

Ratio of multipass textures compared to the color map

I have 4 textures used in a multi-pass effect with the color map at the highest quality - which for this example is 512x512. Currently the Normal, Specular & Parallax maps are the same dimensions. The additional maps are taking a significant portion…
Chris Masterton
  • 2,197
  • 4
  • 24
  • 30
3
votes
2 answers

Does OpenGL clamp the output of every texture stage?

When using OpenGL 1.4 fixed-function multitexturing, is the output of every texture stage clamped to [0, 1] before being passed onto the next stages? The spec says (page 153): If the value of TEXTURE_ENV_MODE is COMBINE, the form of the texture…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
3
votes
1 answer

How to draw a triangle with own texture on each corner?

Basically, i want to give 3 textures for each corner of a triangle, and interpolate from one texture to another, just like the colors would be interpolated with glColor() on the corners. Edit: Since this doesnt seem to be possible via texture…
Rookie
  • 3,753
  • 5
  • 33
  • 33
3
votes
2 answers

How are textures referenced in shaders?

Quick OpenGL newbie question. I have this line in my fragment shader: uniform sampler2D mytexture; I grepped into the sample code I'm using and I couldn't find any reference to mytexture; only found calls which activate a texture unit and bind a…
Dean
  • 6,610
  • 6
  • 40
  • 90
3
votes
1 answer

Texturing multiple objects with different textures

Could some one explain for me how can I render multiple objects with different textures in OpenGL? I think that I'm nearly to the final result but at the moment I got stuck here and I don't know what I need to do next. Really need some helps! At the…
Trung Bún
  • 1,117
  • 5
  • 22
  • 47
3
votes
1 answer

OpenGL ES (iPhone) multi-texturing (2D) code

I have a texture from this PNG: And another from this PNG: They both have the same blend function: glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); I want to see them on one single polygon first. I just couldn't find a simple example of this. Draw…
Geri Borbás
  • 15,810
  • 18
  • 109
  • 172
1
2 3 4