Blending and transparent overlays

Feanor
Unregistered
 
Post: #16
Arekkusu,

I just wanted to point out that, in playing with Apple's tex combine lab, I was able to get both colour and level of transparency to change dynamically using a texture and primary colour in the first texture unit, so that I could get it to draw the "texture 0" over the rock texture. If the text colour had been black, changing the primary colour's value allowed for greater and lesser opacity when combined with the image texture (in the second texture unit) using the modulate function.

That program is kick ass. Now I understand DOT3 a lot better than I did before, just by experimenting until I was able to figure out how to make the light on the rocks appear to change direction and intensity just by changing the colour that was used in the DOT3 operation.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #17
The corresponding internal formats are GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGBA and GL_RGBA.

The way to make texture uploads fast is to match the card's actual internal format to your own format. Since you don't know what actual internal formats the card will use (beyond BGRA/UNSIGNED_INT_8_8_8_8_REV), it's experimentation from there on in. I'm pretty sure I recall from somewhere that GeForces store everything either as BGRA/UNSIGNED_INT_8_8_8_8_REV or as LUMINANCE_ALPHA internally, but that Mac drivers won't take advantage of the latter. I don't know if this has changed at all.

Client Storage may well slow down texture uploads if you don't match the internal format of the card, since normally your texture would be copied to driver memory and put in the appropriate format for a quick upload, and client storage avoids this copy.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparent textures kordeul 2 2,621 Aug 27, 2007 01:38 AM
Last Post: kordeul
  general blending versus texture blending questions WhatMeWorry 2 5,135 Dec 7, 2006 02:43 PM
Last Post: arekkusu
  Blending mode for Transparent fog? JeroMiya 2 2,667 Jan 30, 2004 08:09 AM
Last Post: MattDiamond
  Transparent Color? Josh 6 5,837 Apr 22, 2002 05:27 AM
Last Post: Josh