mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Fix a few typos in the comments/logging in VideoDX9, VideoCommon, and VideoSoftware projects.
See Render.cpp, PixelShaderGen.cpp, and PixelShaderManager.cpp for most of the changes. See VertexShaderManager.cpp for a logging typo fix. See SWRenderer.cpp for a small typo fix for a message that gets swprintf'd in DrawDebugText. See SWVertexLoader.cpp for a typo fix of an assert message. Should slightly improve the readability of some of those files.
This commit is contained in:
@ -390,7 +390,7 @@ static const char *tevCInputTable[] = // CC
|
||||
"float3(0.5f, 0.5f, 0.5f)", // HALF
|
||||
"(konsttemp.rgb)", //"konsttemp.rgb", // KONST
|
||||
"float3(0.0f, 0.0f, 0.0f)", // ZERO
|
||||
///aded extra values to map clamped values
|
||||
///added extra values to map clamped values
|
||||
"(cprev.rgb)", // CPREV,
|
||||
"(cprev.aaa)", // APREV,
|
||||
"(cc0.rgb)", // C0,
|
||||
@ -1336,7 +1336,7 @@ static void WriteFog(char *&p)
|
||||
|
||||
// x_adjust = sqrt((x-center)^2 + k^2)/k
|
||||
// ze *= x_adjust
|
||||
//this is complitly teorical as the real hard seems to use a table intead of calculate the values.
|
||||
//this is completely theoretical as the real hardware seems to use a table instead of calculating the values.
|
||||
if (bpmem.fogRange.Base.Enabled)
|
||||
{
|
||||
WRITE (p, "\tfloat x_adjust = (2.0f * (clipPos.x / " I_FOG"[2].y)) - 1.0f - " I_FOG"[2].x;\n");
|
||||
|
@ -245,14 +245,14 @@ void PixelShaderManager::SetConstants()
|
||||
{
|
||||
//bpmem.fogRange.Base.Center : center of the viewport in x axis. observation: bpmem.fogRange.Base.Center = realcenter + 342;
|
||||
int center = ((u32)bpmem.fogRange.Base.Center) - 342;
|
||||
// normalice center to make calculations easy
|
||||
// normalize center to make calculations easy
|
||||
float ScreenSpaceCenter = center / (2.0f * xfregs.viewport.wd);
|
||||
ScreenSpaceCenter = (ScreenSpaceCenter * 2.0f) - 1.0f;
|
||||
//bpmem.fogRange.K seems to be a table of precalculated coeficients for the adjust factor
|
||||
//observations: bpmem.fogRange.K[0].LO apears to be the lowest value and bpmem.fogRange.K[4].HI the largest
|
||||
// they always seems to be larger than 256 so my teory is :
|
||||
// they are the coeficients from the center to th e border of the screen
|
||||
// so to simplify i use the hi coeficient as K in the shader taking 256 as the scale
|
||||
//bpmem.fogRange.K seems to be a table of precalculated coefficients for the adjust factor
|
||||
//observations: bpmem.fogRange.K[0].LO appears to be the lowest value and bpmem.fogRange.K[4].HI the largest
|
||||
// they always seems to be larger than 256 so my theory is :
|
||||
// they are the coefficients from the center to the border of the screen
|
||||
// so to simplify I use the hi coefficient as K in the shader taking 256 as the scale
|
||||
SetPSConstant4f(C_FOG + 2, ScreenSpaceCenter, (float)Renderer::EFBToScaledX((int)(2.0f * xfregs.viewport.wd)), bpmem.fogRange.K[4].HI / 256.0f,0.0f);
|
||||
}
|
||||
else
|
||||
|
@ -122,7 +122,7 @@ void UpdateProjectionHack(int iPhackvalue[], std::string sPhackvalue[])
|
||||
|
||||
if (iPhackvalue[0] == 1)
|
||||
{
|
||||
NOTICE_LOG(VIDEO, "\t\t--- Ortographic Projection Hack ON ---");
|
||||
NOTICE_LOG(VIDEO, "\t\t--- Orthographic Projection Hack ON ---");
|
||||
|
||||
fhacksign1 *= (iPhackvalue[1] == 1) ? -1.0f : fhacksign1;
|
||||
sTemp[0] = (iPhackvalue[1] == 1) ? " * (-1)" : "";
|
||||
@ -191,7 +191,7 @@ void VertexShaderManager::Dirty()
|
||||
}
|
||||
|
||||
// Syncs the shader constant buffers with xfmem
|
||||
// TODO: A cleaner way to control the matricies without making a mess in the parameters field
|
||||
// TODO: A cleaner way to control the matrices without making a mess in the parameters field
|
||||
void VertexShaderManager::SetConstants()
|
||||
{
|
||||
if (g_ActiveConfig.backend_info.APIType == API_OPENGL && !g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
|
Reference in New Issue
Block a user