#169833 - DiscoStew - Wed Aug 05, 2009 8:14 pm
1) I have begun working with the RGB8_A5 format (3bits of color, 5bits of alpha), and I'm seeing a problem with two polygons using that texture format when overlapping each other. The areas where the alpha is closer to 0 (making it really faint) seem to show a lightly tinted black on the polygon "closer" tothe camera than the other, as opposed to mixing the colors based on the alpha. Is this where the polygon id comes into play? I've never really understood that portion of the polygon format.
2) Is there a way to brighten the colors on a 8-bit texture without resorting to palette manipulation? I had thought that increasing the emission would do it (since it acts like light coming from the polygon), but it only seems to modulate how much red/green/blue the polygon will use, and not actually increase the intensity to higher levels.
_________________
DS - It's all about DiscoStew
#169877 - hacker013 - Sat Aug 08, 2009 12:26 pm
For problem 1 you have to give them the same ID if you want them to mix. I think that is easy ^^
_________________
Website / Blog
Let the nds be with you.
#169888 - Min - Mon Aug 10, 2009 12:43 pm
Actually, it's the other way around, polygons with different ids blend.
DiscoStew, have you tested it on hardware? I made a quick test and in no$gba I get the same slightly darker areas as you describe, but on hardware it looks ok.
#169889 - DiscoStew - Mon Aug 10, 2009 3:42 pm
Yeah, I tried it out with my program, and it looked like it worked on both hardware and emulator.
_________________
DS - It's all about DiscoStew
#169890 - elhobbs - Mon Aug 10, 2009 4:45 pm
you could try vertex or polygon colors using glColor. though this would only be able to darken certain areas not lighten them.
another more difficult approach would be to use the per polygon depth equal test in conjunction with a specially crafted "brightness" texture. I use this for the dual layer sky texture in cquake I do not use it to lighten areas myself but I could see how overlaying a white texture and blending by certain amounts may produce results along the lines you are looking for. this does have some undesireable side effects like using double the triangle count and it has to be used with the less precise glFlush mode 0.
#169892 - Synthetic - Mon Aug 10, 2009 7:45 pm
A quick, if slightly hackish, way to brighten the scene is to use multiple lights, all placed in the same location. You can do it very easily even if you don't use the lighting at the moment, just pop a glNormal pointed at the light before every batch of polys you draw.
#169898 - TwentySeven - Tue Aug 11, 2009 5:06 am
I think the specular lookup table can be abused to give you a all-over brightening.