VertexShaderGen: Fix D3D X3014 compile error

float2 requires 2 parameters in HLSL apparently.
This commit is contained in:
EmptyChaos 2016-09-01 04:43:19 +00:00
parent 15a009706d
commit e0d4dc6fed
1 changed files with 3 additions and 1 deletions

View File

@ -388,7 +388,9 @@ ShaderCode GenerateVertexShaderCode(APIType api_type, const vertex_shader_uid_da
if (texinfo.texgentype == XF_TEXGEN_REGULAR)
{
out.Write("if(o.tex%d.z == 0.0f)\n", i);
out.Write("\to.tex%d.xy = clamp(o.tex%d.xy / 2.0f, float2(-1.0f), float2(1.0f));\n", i, i);
out.Write(
"\to.tex%d.xy = clamp(o.tex%d.xy / 2.0f, float2(-1.0f,-1.0f), float2(1.0f,1.0f));\n", i,
i);
}
out.Write("}\n");