Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
103 lines
2.6 KiB
C++
103 lines
2.6 KiB
C++
// FullSceneEffect.h: interface for the CFullSceneEffect class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_FULLSCENEEFFECT_H__3E5DCE3F_4B17_40D9_A830_FCE7E55D490A__INCLUDED_)
|
|
#define AFX_FULLSCENEEFFECT_H__3E5DCE3F_4B17_40D9_A830_FCE7E55D490A__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
#include <d3dx8.h>
|
|
#include <d3d8.h>
|
|
#include <vector>
|
|
|
|
#include "Vertex.h"
|
|
#include "FullSceneShader.h"
|
|
|
|
enum FULLSCENE_EFFECTS {
|
|
FULLSCENE_MOTIONBLUR = 0,
|
|
FULLSCENE_BRIGHT,
|
|
FULLSCENE_BLACK,
|
|
// FULLSCENE_CONTRAST,
|
|
FULLSCENE_EDGE,
|
|
FULLSCENE_NEGATIVE,
|
|
FULLSCENE_SEPIA,
|
|
// FULLSCENE_SOLAR,
|
|
FULLSCENE_EDGE2,
|
|
FULLSCENE_EDGE3,
|
|
FULLSCENE_SHARPEN,
|
|
// FULLSCENE_LEVEL,
|
|
FULLSCENE_SATURATION,
|
|
FULLSCENE_SATURATION2,
|
|
FULLSCENE_NUMS,
|
|
};
|
|
#define FULLSCENE_BLURTEXNUM 2
|
|
#define FULLSCENE_BLURTEXSIZE 1024
|
|
#define FULLSCENE_RENDERSIZE 1024
|
|
|
|
|
|
class CFullSceneEffect
|
|
{
|
|
protected:
|
|
LPDIRECT3DDEVICE8 m_pDevice;
|
|
D3DCAPS8 m_pCaps;
|
|
bool m_bPixelShader;
|
|
|
|
LPDIRECT3DTEXTURE8 m_pBlurTexture[FULLSCENE_BLURTEXNUM];
|
|
LPDIRECT3DSURFACE8 m_pBlurTextureSurf[FULLSCENE_BLURTEXNUM];
|
|
int m_iCurrentBlurTex;
|
|
int m_iBlurTexUpdateFrame; // BlurTex Update °£°Ý
|
|
int m_iBlurTexUpdateCount;
|
|
|
|
|
|
LPDIRECT3DTEXTURE8 m_pRenderTexture;
|
|
LPDIRECT3DSURFACE8 m_pRenderTextureSurface;
|
|
LPDIRECT3DSURFACE8 m_pRenderZSurface;
|
|
|
|
LPDIRECT3DSURFACE8 m_pFrameBuffer;
|
|
LPDIRECT3DSURFACE8 m_pFrameZBuffer;
|
|
bool m_bFlag[FULLSCENE_NUMS];
|
|
|
|
D3DVIEWPORT8 m_FrameViewport;
|
|
D3DVIEWPORT8 m_RenderViewport;
|
|
D3DVIEWPORT8 m_ClearViewport;
|
|
|
|
int m_iFrameWidth;
|
|
int m_iFrameHeight;
|
|
|
|
int m_iRenderWidth;
|
|
int m_iRenderHeight;
|
|
|
|
LPDIRECT3DVERTEXBUFFER8 m_pVertexBuffer;
|
|
|
|
std::vector<CFullSceneShader *> m_lstEffects;
|
|
int m_iBlurFirstUpdate;
|
|
bool m_bFullSceneEffect;
|
|
|
|
public:
|
|
CFullSceneEffect();
|
|
virtual ~CFullSceneEffect();
|
|
|
|
void Init(LPDIRECT3DDEVICE8 lpDevice);
|
|
|
|
void CreateVertexBuffer();
|
|
|
|
HRESULT BeginRender(DWORD dwClearColor);
|
|
HRESULT EndRender();
|
|
void Render(int i = 0);
|
|
void RenderMulti(CFullSceneEffect *pEffect = NULL);
|
|
void Update();
|
|
void SetFlag(int i,bool bFlag) { m_bFlag[i] = bFlag;}
|
|
bool GetFlag(int i) {return m_bFlag[i];}
|
|
void SetBlurUpdateFrame(int iFrame) { m_iBlurTexUpdateFrame = iFrame;}
|
|
bool GetEnable() { return m_bFullSceneEffect;}
|
|
|
|
int GetRenderWidth() { return m_iRenderWidth;}
|
|
int GetRenderHeight() { return m_iRenderHeight;}
|
|
|
|
VOID SetFullSceneEffectEnable( bool bFullScene ) { m_bFullSceneEffect = bFullScene ; }
|
|
};
|
|
|
|
#endif // !defined(AFX_FULLSCENEEFFECT_H__3E5DCE3F_4B17_40D9_A830_FCE7E55D490A__INCLUDED_)
|