   Palettes
  Is there any way to support palettes (or an alternative that behaves like a palette) in Direct3D? I know of the texture entries, but that assumes that the device you are using supports alpha palettes (which mine, and everyone I've tested my program on does not support).This way I won't have to create lots of unnecessary copies of my textures just because I want to change a single color from blue to red.[edited by - Zorbfish on February 9, 2004 12:35:15 PM]
  If you want to change the color of a textured object, consider using the D3DFVF_DIFFUSE tag in your vertex structure.  You can assign each vertex a color, which is then interpolated between vertices, but if you have a quad and make all four vertices the same color, the quad can inherit that color.  I''m sorry, don''t know of a better way to say it.  Basically, the color you set (if you set your texture stages right) can be modulated with the texture color and produce a mixed output.  This won''t help with multi-colored textures most of the time (unless you want to remove Red green or blue or make one of them more prevalent), works really well with highlight textures (white, gray, black).You''ll want to set the texture stage states so that the COLOROP is MODULATE and the first argument is the TEXTURE and the second argument is the DIFFUSE (or vice versa).  This will take the color of the texture for that vertex and multiply it by the color in the Diffuse variable of your vertex.Hope this helps,Chris ;  That''s not really what I was going for, thanks anyway. I did know about this and its useful for modulating pre-existing colors, but you can''t manipulate the colors on the texture. ;  Hate to do this but *bump*So is it safe to say that palette manipulation is dead? I find this odd because there are still quite a few commercial games out there using 2D and 3D and they use palette manipulation.Is this possible with OpenGL? ;  I have a GeForce3.  With the same drivers, using DX8 capsviewer I have P8, but no L8, A8, or A8L8.  In DX9 capsviewer I have L8 and A8L8, but no P8 (and oddly, no A8).  So, it looks like people are trying to get away from P8 textures in DX9.If you want to swap just a single color you could make a simple Pixel shader.  Overkill, but, necessary it seems.It''s possible to use one texture as a lookup offset into a second texture.  By changing the second texture you are effectively swapping the palette.  The down side is that it really only works for POINT filtering, but that''s fine for 2D games.  Another downside is that it requires fairly new hardware (but if you''re using DX9 you''re hoping for newish hardware anyway).