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>
This commit is contained in:
93
GameTools/Zallad3D SceneClass/WBWaterNormalTexGenPShader.cpp
Normal file
93
GameTools/Zallad3D SceneClass/WBWaterNormalTexGenPShader.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
// WBWaterNormalTexGenPShader.cpp: implementation of the WBWaterNormalTexGenPShader class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "./WBWaterNormalTexGenPShader.h"
|
||||
#include "SceneManager.h"
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
WBWaterNormalTexGenPShader::WBWaterNormalTexGenPShader()
|
||||
{
|
||||
/* m_pBaseTexture = new WBTexture;
|
||||
m_pEnvTexture = new WBTexture;
|
||||
m_pNormalTexture = new WBTexture;
|
||||
*/
|
||||
|
||||
char path[256];
|
||||
GetCurrentDirectory(256,path);
|
||||
sprintf(path,"%s\\Shaders\\Dot3x2EmbMap_SrcAlpha.psh",path);
|
||||
CreatePixelShaderFromFile(path);
|
||||
}
|
||||
|
||||
WBWaterNormalTexGenPShader::~WBWaterNormalTexGenPShader()
|
||||
{
|
||||
/* 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 WBWaterNormalTexGenPShader::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 WBWaterNormalTexGenPShader::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);
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user