Partially revert "Now CG plays nice with this new stuff."

This reverts commit 3943840d5c.

Suppport for old GLSL versions has been dropped, so to make things less ugly we can use a structure for lights again.
This commit is contained in:
NeoBrainX
2013-03-26 18:07:42 +01:00
parent ae62af8a93
commit 30f1a4b4fe
3 changed files with 18 additions and 16 deletions

View File

@ -590,7 +590,8 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
WRITE(p, "\t%sfloat4 " I_FOG"[3] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_FOG));
// For pixel lighting
WRITE(p, "\t%sfloat4 " I_PLIGHTS"[40] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PLIGHTS));
WRITE(p, "struct Light { float4 col; float4 cosatt; float4 distatt; float4 pos; float4 dir; };\n");
WRITE(p, "\t%sLight " I_PLIGHTS"[8] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PLIGHTS));
WRITE(p, "\t%sfloat4 " I_PMATERIALS"[4] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_PMATERIALS));
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)