Sign in to follow this  

directx10 white isnt white

This topic is 3378 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im mapping a texture with raw data but for some reason when i map it with what i think should be solid white, for a r8g8b8a8 being 255,255,255,255 it comes out as a near white sort of gray, but its not as white as any other white on my screen? like a text document or webpage or anything. is there a brightness adjustment or something?

Share this post


Link to post
Share on other sites
there is no lighting and no shadows, its just a 2d rectangle covered in a mapped texture. ive been looking at the gamma corrections but there is little info on how to play with it, but it seems more like a scaling for the values between 255 and 0 and not something that will raise the 255 to the brightness i want?

Share this post


Link to post
Share on other sites
Quote:
Original post by ucfchuck
there is no lighting and no shadows, its just a 2d rectangle covered in a mapped texture. ive been looking at the gamma corrections but there is little info on how to play with it, but it seems more like a scaling for the values between 255 and 0 and not something that will raise the 255 to the brightness i want?


Could it be interpolating with one of the other pixels?

Share this post


Link to post
Share on other sites
fixed it, the problem was in here

public void Application_Idle(object sender, EventArgs e)
{
// Clear the back buffer
Color4 ClearColor = new Color4(0.0f, 0.0f, 0.0f, 0.0f);
g_pd3dDevice.ClearRenderTargetView(g_pRenderTargetView, ClearColor);

// Update variables that change once per frame
g_pWorldVariable.SetMatrix(g_World);
g_pMeshColorVariable.Set(g_vMeshColor);<--- this line

// render the surface
for (int p = 0; p < g_pTechnique.Description.PassCount; ++p)
{
g_pTechnique.GetPassByIndex(p).Apply();
g_pd3dDevice.DrawIndexed(6 * numlines, 0, 0);
}

// Present our back buffer to our front buffer
g_pSwapChain.Present(0, 0);
}



where
public Vector4 g_vMeshColor = new Vector4(1.0f, 1.0f, 1.0f, 1.0f);

used to be
public Vector4 g_vMeshColor = new Vector4(0.7f, 0.7f, 0.7f, 1.0f);

Share this post


Link to post
Share on other sites

This topic is 3378 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this