directx10 white isnt white

Started by
4 comments, last by ucfchuck 15 years, 7 months ago
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?
Advertisement
There's gamma you can play with. Depending on your scene setup it could also be because of: material, lights, shadows, etc

-me
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?
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?
This is your life, and it's ending one minute at a time. - Fight club
Photobucket

it could be interpolating with the background maybe but i dont think it is?
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);

This topic is closed to new replies.

Advertisement