Hi,
I am using Directx (using c#). I am loading a texture in a triangle, and now i want that i should be able to change its brightness and contrast. Help Help Help!
Changing brightness and Contrast (Directx 9.0c+C#)
Started by tatv, Jan 28 2005 05:30 AM
2 replies to this topic
#1
Posted 28 January 2005 - 05:30 AM
#2
Posted 04 February 2005 - 06:35 PM
tatv said:
To change the brightness of a pixel you'll need to multiply that color by an constant that is less that 1 but greater than zero. That's from experience. Constrast... not sure exactly what it means. How is it different from brightness?
#3
Posted 04 February 2005 - 09:17 PM
If you just want to increase the brightness of thec texture, you can apply some texture stage states to it. Set the first color arg to diffuse and have the second color arg to texture. Then set the color op as either module2x or modulate 4x. Play with the color values of the vertices to see the level of brightness change.
Or the other option is use a pixel shader. tex2d the pixel and multiply it by some constant.
Or the other option is use a pixel shader. tex2d the pixel and multiply it by some constant.
- TripleBuffer
- Me blog
- Me blog
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












