Shader/GlslWriter: Rename scaleZPosition to remapZPosition
This commit is contained in:
parent
237602a33f
commit
57d39f7eeb
|
|
@ -43,7 +43,7 @@ namespace Nz
|
||||||
unsigned int glMinorVersion = 0;
|
unsigned int glMinorVersion = 0;
|
||||||
bool glES = false;
|
bool glES = false;
|
||||||
bool flipYPosition = false;
|
bool flipYPosition = false;
|
||||||
bool scaleZPosition = false;
|
bool remapZPosition = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* GetFlipYUniformName();
|
static const char* GetFlipYUniformName();
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ namespace Nz
|
||||||
return context.IsExtensionSupported(std::string(ext));
|
return context.IsExtensionSupported(std::string(ext));
|
||||||
};
|
};
|
||||||
env.flipYPosition = true;
|
env.flipYPosition = true;
|
||||||
env.normalizeDepth = true;
|
env.remapZPosition = true;
|
||||||
|
|
||||||
GlslWriter writer;
|
GlslWriter writer;
|
||||||
writer.SetEnv(env);
|
writer.SetEnv(env);
|
||||||
|
|
|
||||||
|
|
@ -1154,7 +1154,7 @@ namespace Nz
|
||||||
if (m_environment.flipYPosition)
|
if (m_environment.flipYPosition)
|
||||||
AppendLine(targetName, ".y *= ", s_flipYUniformName, ";");
|
AppendLine(targetName, ".y *= ", s_flipYUniformName, ";");
|
||||||
|
|
||||||
if (m_environment.scaleZPosition)
|
if (m_environment.remapZPosition)
|
||||||
AppendLine(targetName, ".z = ", targetName, ".z * 2.0 - 1.0;");
|
AppendLine(targetName, ".z = ", targetName, ".z * 2.0 - 1.0;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue