Shader/GlslWriter: Rename scaleZPosition to remapZPosition

This commit is contained in:
Lynix 2021-11-21 16:15:56 +01:00
parent 237602a33f
commit 57d39f7eeb
3 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ namespace Nz
unsigned int glMinorVersion = 0;
bool glES = false;
bool flipYPosition = false;
bool scaleZPosition = false;
bool remapZPosition = false;
};
static const char* GetFlipYUniformName();

View File

@ -96,7 +96,7 @@ namespace Nz
return context.IsExtensionSupported(std::string(ext));
};
env.flipYPosition = true;
env.normalizeDepth = true;
env.remapZPosition = true;
GlslWriter writer;
writer.SetEnv(env);

View File

@ -1154,7 +1154,7 @@ namespace Nz
if (m_environment.flipYPosition)
AppendLine(targetName, ".y *= ", s_flipYUniformName, ";");
if (m_environment.scaleZPosition)
if (m_environment.remapZPosition)
AppendLine(targetName, ".z = ", targetName, ".z * 2.0 - 1.0;");
}
}