Files
Client/GameTools/Zallad3D SceneClass/WBWaterNormalTexGenPEqualCom.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
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>
2025-11-29 20:17:20 +09:00

93 lines
3.4 KiB
C++

// WBWaterNormalTexGenPEqualCom.cpp: implementation of the WBWaterNormalTexGenPEqualCom class.
//
//////////////////////////////////////////////////////////////////////
#include "./WBWaterNormalTexGenPEqualCom.h"
#include "SceneManager.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
WBWaterNormalTexGenPEqualCom::WBWaterNormalTexGenPEqualCom()
{
/* m_pBaseTexture = new WBTexture;
m_pEnvTexture = new WBTexture;
m_pNormalTexture = new WBTexture;
*/
char path[256];
GetCurrentDirectory(256,path);
sprintf(path,"%s\\Shaders\\EqualCombine.psh",path);
CreatePixelShaderFromFile(path);
}
WBWaterNormalTexGenPEqualCom::~WBWaterNormalTexGenPEqualCom()
{
/* if(m_pBaseTexture != NULL)
{
delete m_pBaseTexture;
m_pBaseTexture = NULL;
}
if(m_pEnvTexture != NULL)
{
delete m_pEnvTexture;
m_pEnvTexture = NULL;
}
if(m_pNormalTexture != NULL)
{
delete m_pNormalTexture;
m_pNormalTexture = NULL;
}*/
}
void WBWaterNormalTexGenPEqualCom::Apply() {
/*
CSceneManager::GetDevice()->SetTexture(0, m_pBaseTexture->GetTexture() );
CSceneManager::GetDevice()->SetTexture(1, m_pNormalTexture->GetTexture() );
CSceneManager::GetDevice()->SetTexture(2, m_pEnvTexture->GetTexture() );
*/
// Set Pixel Shader
CSceneManager::GetDevice()->SetPixelShader(m_dwPixelShader);
SetupPixelShaderConstants();
}
void WBWaterNormalTexGenPEqualCom::SetupPixelShaderConstants() {
/*CSceneManager::GetDevice()->SetTextureStageState(0,D3DTSS_MAGFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(0,D3DTSS_MINFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(0,D3DTSS_MIPFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(1,D3DTSS_MAGFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(1,D3DTSS_MINFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(1,D3DTSS_MIPFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(3,D3DTSS_MAGFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(3,D3DTSS_MINFILTER,D3DTEXF_LINEAR);
CSceneManager::GetDevice()->SetTextureStageState(3,D3DTSS_MIPFILTER,D3DTEXF_LINEAR);
// Base texture stage
CSceneManager::GetDevice()->SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
CSceneManager::GetDevice()->SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
CSceneManager::GetDevice()->SetRenderState( D3DRS_WRAP0, 0 );
// bump map texture stage
CSceneManager::GetDevice()->SetTextureStageState(1, D3DTSS_ADDRESSU, D3DTADDRESS_WRAP);
CSceneManager::GetDevice()->SetTextureStageState(1, D3DTSS_ADDRESSV, D3DTADDRESS_WRAP);
CSceneManager::GetDevice()->SetRenderState( D3DRS_WRAP1, 0 );
// Illumination texture
CSceneManager::GetDevice()->SetTextureStageState(2, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP);
CSceneManager::GetDevice()->SetTextureStageState(2, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP);
CSceneManager::GetDevice()->SetTextureStageState(2, D3DTSS_ADDRESSW, D3DTADDRESS_CLAMP);
CSceneManager::GetDevice()->SetRenderState( D3DRS_WRAP2, 0);
CSceneManager::GetDevice()->SetTextureStageState(3, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP);
CSceneManager::GetDevice()->SetTextureStageState(3, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP);
CSceneManager::GetDevice()->SetTextureStageState(3, D3DTSS_ADDRESSW, D3DTADDRESS_CLAMP);
*/
}