Skip to main content
gamedev.net
🔒 Locked

Using float values as colors

Started by curtmax_0 0 replies 800+ views
Original Post
curtmax_0
curtmax_0
Is there any way to use 4 float values, instead of a single long value, as vertex colors in d3d?
Namethatnobodyelsetook
Namethatnobodyelsetook
Yes. If the color is constant, choose 1 or 2. If non-constant color (real per-vertex color) choose 3.

1) Don''t use vertex colors, and use material colors which are specified as floats.

2) Don''t use the fixed pipeline, and use a shader constant of 4 floats

3) Don''t use the fixed pipeline, and specify 4 floats as your vertex data for color.

Cards that cannot use shaders are also not going to have the ability to use more detailed colors, so it''s not really a limitation.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.