This topic is now archived and is closed to further replies.


New Problem with Gourad in 16b mode

Recommended Posts

ByteMe95    122
Hey all, I get a new problem with gourad shading. I Think I got the vertex normals thing down, but I have a new problem. I''m running in 16bit mode, setting up with DX, then locking the surface and doing my business. So when i do flat shading, I need 3 variables, Red Green Blue, and then i do something along the lines of Red = PolyRed*Intensity, Green = PolyGreen... and so on then to draw i do buffer[...] = RGB16(Red, Green, Blue) It works fine but doesn''t seem efficient. Anyway, that''s not the problem. I trid to start gourad yesterday and found myself immersed in like 30+ variables in my poly filler. I need things like dxRedright, dxGreenright, ..., dxRedleft, dxGre..., StartRed, ..., EndRed, End..., Then i have to calculate all this shite with interpolation and it''s just gotten extremely messy. So my question(s) are as follows: 1) IS there a way to do this without breaking down the color components? what about in 24 or 32b mode? 2) If not, is this the standard way of doing this, with ALL those variables (mostly floats too) 3) Should I make a light lookup table? I''d rather not. Any help would be appreciated guys - Rob ByteMe95::~ByteMe95()

Share this post

Link to post
Share on other sites