Advertisement

super duper texture clamp?

Started by June 26, 2003 07:29 PM
2 comments, last by InfestedFurby 21 years, 8 months ago
im wondering if its possible to do the following in opengl and if so how it is done. I want to use multitextureing to put a couple of different textures on a single triangle, but in different positions. for example, if i have a quad like so ************* * | * * 1 | 2 * * | * *-----+-----* * | * * 3 | 4 * * | * ************* ugh that quad looks really ugly on the forum. ill try again ***** *1|2* *-+-* *3|4* ***** I would like to be able to draw on 4 separate textures in the locations shown. Hopefully this can be done without having opengl do the calculations for every pixel in the quad 4 times. It would not be useful to combine the 4 textures into one because my game will have many such quads with different combinations of textures used. It would be nice if i could do something like this in a fast way without having to combine the textures or split the polygons. Please help if you know how this can be done. [edited by - infestedfurby on June 26, 2003 11:18:13 PM]
Infested Furbyinfestedfurby@hotmail.cominfestedfurby.cjb.net
I think it will be more trouble than it's worth. Try just splitting the polys up.

If you really want to do this, you'll probably need to create textures with an alpha component different around the edges, fix the texture coordinates to position the texture where you want it and use CLAMP. Do an alpha test for each layer (except the first) to remove the clamped part of the textue.

[edited by - JuNC on June 27, 2003 10:56:49 AM]
Advertisement
Ya i was afraid that might be the only way. The problem is that opengl is still filling all the pixels a bunch of times w/ 0 alpha pixel so it''s doing way more filling than it should have to. I guess it''s probably faster just to split the polys than to use up that much of the card''s fill rate.
Infested Furbyinfestedfurby@hotmail.cominfestedfurby.cjb.net
I''d split them into 4 quads and group them in a display list for each combo being rendered.

-solo (my site)
-solo (my site)

This topic is closed to new replies.

Advertisement