HLSL: add optional position.Y inversion
Adds command line options:
--invert-y
--iy
(synonyms) which invert position.Y on vertex shader output. Handles these cases:
* Direct single variable return
* Member of direct returned struct
* Single variable output parameter
* Member of struct output parameter
API:
// Enables position.Y output negation in vertex shader
void TShader::setInvertY(bool invert);
Fixes #1173
This commit is contained in:
parent
471bfed062
commit
b22c069f7a
13 changed files with 549 additions and 1 deletions
|
|
@ -224,6 +224,7 @@ public:
|
|||
#endif
|
||||
autoMapBindings(false),
|
||||
autoMapLocations(false),
|
||||
invertY(false),
|
||||
flattenUniformArrays(false),
|
||||
useUnknownFormat(false),
|
||||
hlslOffsets(false),
|
||||
|
|
@ -317,6 +318,14 @@ public:
|
|||
processes.addProcess("auto-map-locations");
|
||||
}
|
||||
bool getAutoMapLocations() const { return autoMapLocations; }
|
||||
void setInvertY(bool invert)
|
||||
{
|
||||
invertY = invert;
|
||||
if (invertY)
|
||||
processes.addProcess("invert-y");
|
||||
}
|
||||
bool getInvertY() const { return invertY; }
|
||||
|
||||
void setFlattenUniformArrays(bool flatten)
|
||||
{
|
||||
flattenUniformArrays = flatten;
|
||||
|
|
@ -682,6 +691,7 @@ protected:
|
|||
std::vector<std::string> resourceSetBinding;
|
||||
bool autoMapBindings;
|
||||
bool autoMapLocations;
|
||||
bool invertY;
|
||||
bool flattenUniformArrays;
|
||||
bool useUnknownFormat;
|
||||
bool hlslOffsets;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue