Merge pull request #3951 from leoetlino/formatting-fix

LightingShaderGen: Fix formatting
This commit is contained in:
Markus Wick 2016-06-27 09:59:48 +02:00 committed by GitHub
commit c4838b9cbc
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ static void GenerateLightShader(ShaderCode& object, const LightingUidData& uid_d
LIGHT_DIR_PARAMS(index)); LIGHT_DIR_PARAMS(index));
object.Write("cosAttn = " LIGHT_COSATT ".xyz;\n", LIGHT_COSATT_PARAMS(index)); object.Write("cosAttn = " LIGHT_COSATT ".xyz;\n", LIGHT_COSATT_PARAMS(index));
object.Write("distAttn = %s(" LIGHT_DISTATT ".xyz);\n", object.Write("distAttn = %s(" LIGHT_DISTATT ".xyz);\n",
(diffusefunc == LIGHTDIF_NONE) ? "" : "normalize", LIGHT_DISTATT_PARAMS(index)); (diffusefunc == LIGHTDIF_NONE) ? "" : "normalize", LIGHT_DISTATT_PARAMS(index));
object.Write("attn = max(0.0f, dot(cosAttn, float3(1.0, attn, attn*attn))) / dot(distAttn, " object.Write("attn = max(0.0f, dot(cosAttn, float3(1.0, attn, attn*attn))) / dot(distAttn, "
"float3(1.0, attn, attn*attn));\n"); "float3(1.0, attn, attn*attn));\n");
break; break;
@ -71,8 +71,8 @@ static void GenerateLightShader(ShaderCode& object, const LightingUidData& uid_d
// materials name is I_MATERIALS in vs and I_PMATERIALS in ps // materials name is I_MATERIALS in vs and I_PMATERIALS in ps
// inColorName is color in vs and colors_ in ps // inColorName is color in vs and colors_ in ps
// dest is o.colors_ in vs and colors_ in ps // dest is o.colors_ in vs and colors_ in ps
void GenerateLightingShaderCode(ShaderCode& object, const LightingUidData& uid_data, void GenerateLightingShaderCode(ShaderCode& object, const LightingUidData& uid_data, int components,
int components, const char* inColorName, const char* dest) const char* inColorName, const char* dest)
{ {
for (unsigned int j = 0; j < xfmem.numChan.numColorChans; j++) for (unsigned int j = 0; j < xfmem.numChan.numColorChans; j++)
{ {