diff options
| author | NeoBrainX <NeoBrainX@gmail.com> | 2013-04-10 14:25:18 +0200 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@gmail.com> | 2013-04-10 14:25:18 +0200 |
| commit | abde070f63f62a784dcb59fadd0e72013fa03acf (patch) | |
| tree | 1aab4ed9f39d93d53ec4490d90dbc0cf6a8f59df /Source/Core/VideoCommon/Src/PixelShaderGen.cpp | |
| parent | fab4f1d0a50c2c4c0a4e7e41b6ebe58118438dc0 (diff) | |
LightingShaderGen: Use a float4 array for lights instead of a struct (uniform management in the non-UBO path is a mess otherwise).
Also fix a small bug (cf. revision 154c533e7632).
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 2d9121856c..4dbb56b320 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -338,8 +338,7 @@ void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u out.Write("\t%sfloat4 " I_FOG"[3] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_FOG)); // For pixel lighting - TODO: Should only be defined when per pixel lighting is enabled! - out.Write("struct Light { float4 col; float4 cosatt; float4 distatt; float4 pos; float4 dir; };\n"); - out.Write("\t%sLight " I_PLIGHTS"[8] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PLIGHTS)); + out.Write("\t%sfloat4 " I_PLIGHTS"[40] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PLIGHTS)); out.Write("\t%sfloat4 " I_PMATERIALS"[4] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PMATERIALS)); if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) |
