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>
53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
// Shader_ClassicBumpSpecV.cpp: implementation of the CShader_ClassicBumpSpecV class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#include "Shader_ClassicBumpSpecV.h"
|
|
#include "SceneManager.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Construction/Destruction
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
CShader_ClassicBumpSpecV::CShader_ClassicBumpSpecV(int iShaderValue)
|
|
{
|
|
// Vertex Shader Declare setting
|
|
|
|
DWORD vertexshaderdeclaration[]=
|
|
{
|
|
D3DVSD_STREAM(0),
|
|
(D3DVSD_REG(0, D3DVSDT_FLOAT3)), // vertex position
|
|
(D3DVSD_REG(1, D3DVSDT_FLOAT3)), // vertex normal
|
|
(D3DVSD_REG(2, D3DVSDT_FLOAT2)), // vertex texture coord
|
|
(D3DVSD_REG(3, D3DVSDT_FLOAT3)), // S
|
|
(D3DVSD_REG(4, D3DVSDT_FLOAT3)), // T
|
|
D3DVSD_END()
|
|
};
|
|
|
|
|
|
if(!iShaderValue)
|
|
CreateVertexShader("c:/MP-project/Shaders/ClassicBumpSpec_Diff.vsh",vertexshaderdeclaration);
|
|
else
|
|
CreateVertexShader("c:/MP-project/Shaders/ClassicBumpSpec_Spec.vsh",vertexshaderdeclaration);
|
|
|
|
m_fBumpScale = 10.0f;
|
|
|
|
}
|
|
|
|
CShader_ClassicBumpSpecV::~CShader_ClassicBumpSpecV()
|
|
{
|
|
|
|
}
|
|
void CShader_ClassicBumpSpecV::Apply()
|
|
{
|
|
CSceneManager::GetDevice()->SetVertexShader(m_dwVertexShader);
|
|
SetupVertexShaderConstants();
|
|
|
|
}
|
|
void CShader_ClassicBumpSpecV::SetupVertexShaderConstants()
|
|
{
|
|
// LPDIRECT3DDEVICE8 lpDevice = CSceneManager::GetDevice();
|
|
// lpDevice->SetVertexShaderConstant(CV_BUMP_SCALE, D3DXVECTOR4(0.0f, 0.0f, 0.0f, m_fBumpScale), 1);
|
|
|
|
}
|