Revert the recent zcomploc changes including the Graphic_Fixes merge.

Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.

This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
This commit is contained in:
NeoBrainX
2012-08-10 18:57:37 +02:00
parent 6e02ad55bc
commit 08a9c66037
22 changed files with 211 additions and 358 deletions

View File

@ -105,28 +105,20 @@ public:
typedef _PIXELSHADERUID<false> PIXELSHADERUID;
typedef _PIXELSHADERUID<true> PIXELSHADERUIDSAFE;
// Different ways to achieve rendering
enum PSGRENDER_MODE
// Different ways to achieve rendering with destination alpha
enum DSTALPHA_MODE
{
PSGRENDER_NORMAL, // Render normally, without destination alpha
PSGRENDER_DSTALPHA_ALPHA_PASS, // Render normally first, then render again for alpha
PSGRENDER_DSTALPHA_DUAL_SOURCE_BLEND, // Use dual-source blending
PSGRENDER_ZCOMPLOC //Render to Depth Channel only with no depth dextures enabled
DSTALPHA_NONE, // Render normally, without destination alpha
DSTALPHA_ALPHA_PASS, // Render normally first, then render again for alpha
DSTALPHA_DUAL_SOURCE_BLEND // Use dual-source blending
};
enum ALPHA_PRETEST_RESULT
{
ALPHAPT_UNDEFINED, // AlphaTest Result is not defined
ALPHAPT_ALWAYSFAIL, // Alpha test alway Fail
ALPHAPT_ALWAYSPASS // Alpha test alway Pass
};
const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
const char *GeneratePixelShaderCode(PSGRENDER_MODE PSGRenderMode, API_TYPE ApiType, u32 components);
void GetPixelShaderId(PIXELSHADERUID *uid, PSGRENDER_MODE PSGRenderMode, u32 components);
void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, PSGRENDER_MODE PSGRenderMode, u32 components);
void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 components);
void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode, u32 components);
// Used to make sure that our optimized pixel shader IDs don't lose any possible shader code changes
void ValidatePixelShaderIDs(API_TYPE api, PIXELSHADERUIDSAFE old_id, const std::string& old_code, PSGRENDER_MODE PSGRenderMode, u32 components);
void ValidatePixelShaderIDs(API_TYPE api, PIXELSHADERUIDSAFE old_id, const std::string& old_code, DSTALPHA_MODE dstAlphaMode, u32 components);
#endif // GCOGL_PIXELSHADER_H