GeometryShader: Transform the projection within the geometry shader.

Reduces the amount of data transferred through uniforms.
The shearing transformation is reduced to a single multiplication/addition for optimization.
This commit is contained in:
Jules Blok
2014-10-30 02:08:15 +01:00
parent 4fd943aedd
commit 6cacfad010
4 changed files with 14 additions and 24 deletions

View File

@ -239,7 +239,7 @@ private:
#define I_NORMALMATRICES "cnmtx"
#define I_POSTTRANSFORMMATRICES "cpostmtx"
#define I_DEPTHPARAMS "cDepth" // farZ, zRange
#define I_STEREOPROJECTION "csproj"
#define I_STEREOOFFSET "csoffset"
static const char s_shader_uniforms[] =
"\tfloat4 " I_POSNORMALMATRIX"[6];\n"
@ -251,4 +251,4 @@ static const char s_shader_uniforms[] =
"\tfloat4 " I_NORMALMATRICES"[32];\n"
"\tfloat4 " I_POSTTRANSFORMMATRICES"[64];\n"
"\tfloat4 " I_DEPTHPARAMS";\n"
"\tfloat4 " I_STEREOPROJECTION"[8];\n";
"\tfloat4 " I_STEREOOFFSET";\n";