Major update - Architecture Rework

This commit is contained in:
CatChow0 2025-01-27 22:46:27 +01:00
parent 425224a96c
commit 0d5e26266b
131 changed files with 426 additions and 1348 deletions

View File

@ -0,0 +1 @@
KhaoticEngineReborn

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="userId" value="-6a4cade4:194a9b80ce0:-7ffa" />
</MTProjectMetadataState>
</option>
</component>
</project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="singleClickDiffPreview" value="1" />
<option name="vcsConfiguration" value="3" />
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunManager" selected="C/C++ Project.enginecustom">
<configuration name="KhaoticDemo" type="CppProject" factoryName="C++ Project">
<configuration_1 setup="1">
<option name="CONFIGURATION" value="Debug" />
<option name="PLATFORM" value="x64" />
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
</configuration_1>
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/KhaoticDemo/KhaoticDemo.vcxproj" />
<option name="AUTO_SELECT_PRIORITY" value="0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
<configuration name="enginecustom" type="CppProject" factoryName="C++ Project">
<configuration_1 setup="1">
<option name="CONFIGURATION" value="Debug" />
<option name="PLATFORM" value="x64" />
<option name="CURRENT_LAUNCH_PROFILE" value="Local" />
<option name="EXE_PATH" value="$(LocalDebuggerCommand)" />
<option name="PROGRAM_PARAMETERS" value="$(LocalDebuggerCommandArguments)" />
<option name="WORKING_DIRECTORY" value="$(LocalDebuggerWorkingDirectory)" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="TERMINAL_INTERACTION_BEHAVIOR" value="AUTO_DETECT" />
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
</configuration_1>
<option name="DEFAULT_PROJECT_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
<option name="PROJECT_FILE_PATH" value="$PROJECT_DIR$/enginecustom/enginecustom.vcxproj" />
<option name="AUTO_SELECT_PRIORITY" value="0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
</project>

View File

@ -1,84 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: light.ps
////////////////////////////////////////////////////////////////////////////////
/////////////
// DEFINES //
/////////////
#define NUM_LIGHTS 4
/////////////
// GLOBALS //
/////////////
Texture2D shaderTexture : register(t0);
SamplerState SampleType : register(s0);
cbuffer LightBuffer
{
float4 ambientColor;
float3 lightDirection;
float padding;
float specularPower;
float4 specularColor;
};
cbuffer LightColorBuffer
{
float4 diffuseColor[NUM_LIGHTS];
};
//////////////
// TYPEDEFS //
//////////////
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
float3 normal : NORMAL;
float3 lightPos[NUM_LIGHTS] : TEXCOORD1;
};
////////////////////////////////////////////////////////////////////////////////
// Pixel Shader
////////////////////////////////////////////////////////////////////////////////
float4 LightPixelShader(PixelInputType input) : SV_TARGET
{
float4 textureColor;
float3 lightDir;
float4 color;
float3 reflection;
float4 specular;
float lightIntensity[NUM_LIGHTS];
float4 colorArray[NUM_LIGHTS];
float4 colorSum;
int i;
// Sample the pixel color from the texture using the sampler at this texture coordinate location.
textureColor = shaderTexture.Sample(SampleType, input.tex);
for(i=0; i<NUM_LIGHTS; i++)
{
// Calculate the different amounts of light on this pixel based on the positions of the lights.
lightIntensity[i] = saturate(dot(input.normal, input.lightPos[i]));
// Determine the diffuse color amount of each of the four lights.
colorArray[i] = diffuseColor[i] * lightIntensity[i];
}
// Initialize the sum of colors.
colorSum = float4(0.0f, 0.0f, 0.0f, 1.0f);
// Add all of the light colors up.
for(i=0; i<NUM_LIGHTS; i++)
{
colorSum.r += colorArray[i].r;
colorSum.g += colorArray[i].g;
colorSum.b += colorArray[i].b;
}
// Multiply the texture pixel by the combination of all four light colors to get the final result.
color = saturate(colorSum) * textureColor;
return color;
}

View File

@ -1,85 +0,0 @@
/////////////
// DEFINES //
/////////////
#define NUM_LIGHTS 4
/////////////
// GLOBALS //
/////////////
cbuffer MatrixBuffer
{
matrix worldMatrix;
matrix viewMatrix;
matrix projectionMatrix;
};
cbuffer CameraBuffer
{
float3 cameraPosition;
float padding;
};
cbuffer LightPositionBuffer
{
float4 lightPosition[NUM_LIGHTS];
};
//////////////
// TYPEDEFS //
//////////////
struct VertexInputType
{
float4 position : POSITION;
float2 tex : TEXCOORD0;
float3 normal : NORMAL;
};
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
float3 normal : NORMAL;
float3 lightPos[NUM_LIGHTS] : TEXCOORD1;
};
////////////////////////////////////////////////////////////////////////////////
// Vertex Shader
////////////////////////////////////////////////////////////////////////////////
PixelInputType LightVertexShader(VertexInputType input)
{
PixelInputType output;
float4 worldPosition;
int i;
// Change the position vector to be 4 units for proper matrix calculations.
input.position.w = 1.0f;
// Calculate the position of the vertex against the world, view, and projection matrices.
output.position = mul(input.position, worldMatrix);
output.position = mul(output.position, viewMatrix);
output.position = mul(output.position, projectionMatrix);
// Store the texture coordinates for the pixel shader.
output.tex = input.tex;
// Calculate the normal vector against the world matrix only.
output.normal = mul(input.normal, (float3x3)worldMatrix);
// Normalize the normal vector.
output.normal = normalize(output.normal);
// Calculate the position of the vertex in the world.
worldPosition = mul(input.position, worldMatrix);
for(i=0; i<NUM_LIGHTS; i++)
{
// Determine the light positions based on the position of the lights and the position of the vertex in the world.
output.lightPos[i] = lightPosition[i].xyz - worldPosition.xyz;
// Normalize the light position vectors.
output.lightPos[i] = normalize(output.lightPos[i]);
}
return output;
}

View File

@ -1,91 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: lightclass.cpp
////////////////////////////////////////////////////////////////////////////////
#include "lightclass.h"
LightClass::LightClass()
{
}
LightClass::LightClass(const LightClass& other)
{
}
LightClass::~LightClass()
{
}
void LightClass::SetAmbientColor(float red, float green, float blue, float alpha)
{
m_ambientColor = XMFLOAT4(red, green, blue, alpha);
return;
}
void LightClass::SetDiffuseColor(float red, float green, float blue, float alpha)
{
m_diffuseColor = XMFLOAT4(red, green, blue, alpha);
return;
}
void LightClass::SetDirection(float x, float y, float z)
{
m_direction = XMFLOAT3(x, y, z);
return;
}
void LightClass::SetSpecularColor(float red, float green, float blue, float alpha)
{
m_specularColor = XMFLOAT4(red, green, blue, alpha);
return;
}
void LightClass::SetSpecularPower(float power)
{
m_specularPower = power;
return;
}
void LightClass::SetPosition(float x, float y, float z)
{
m_position = XMFLOAT4(x, y, z, 1.0f);
return;
}
XMFLOAT4 LightClass::GetAmbientColor()
{
return m_ambientColor;
}
XMFLOAT4 LightClass::GetDiffuseColor()
{
return m_diffuseColor;
}
XMFLOAT3 LightClass::GetDirection()
{
return m_direction;
}
XMFLOAT4 LightClass::GetSpecularColor()
{
return m_specularColor;
}
float LightClass::GetSpecularPower()
{
return m_specularPower;
}
XMFLOAT4 LightClass::GetPosition()
{
return m_position;
}

View File

@ -1,53 +0,0 @@
#pragma once
////////////////////////////////////////////////////////////////////////////////
// Filename: lightclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTCLASS_H_
#define _LIGHTCLASS_H_
//////////////
// INCLUDES //
//////////////
#include <directxmath.h>
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: LightClass
////////////////////////////////////////////////////////////////////////////////
class LightClass
{
public:
LightClass();
LightClass(const LightClass&);
~LightClass();
void SetAmbientColor(float, float, float, float);
void SetDiffuseColor(float, float, float, float);
void SetDirection(float, float, float);
void SetSpecularColor(float, float, float, float);
void SetSpecularPower(float);
void SetPosition(float, float, float);
XMFLOAT4 GetAmbientColor();
XMFLOAT4 GetDiffuseColor();
XMFLOAT3 GetDirection();
XMFLOAT4 GetSpecularColor();
float GetSpecularPower();
XMFLOAT4 GetPosition();
void SetIntensity(float intensity) { m_intensity = intensity; }
float GetIntensity() const { return m_intensity; }
private:
XMFLOAT4 m_ambientColor;
XMFLOAT4 m_diffuseColor;
XMFLOAT3 m_direction;
XMFLOAT4 m_specularColor;
float m_intensity;
float m_specularPower;
XMFLOAT4 m_position;
};
#endif

View File

@ -1,544 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: lightshaderclass.cpp
////////////////////////////////////////////////////////////////////////////////
#include "lightshaderclass.h"
LightShaderClass::LightShaderClass()
{
m_vertexShader = 0;
m_pixelShader = 0;
m_layout = 0;
m_sampleState = 0;
m_matrixBuffer = 0;
m_cameraBuffer = 0;
m_lightBuffer = 0;
m_lightColorBuffer = 0;
m_lightPositionBuffer = 0;
}
LightShaderClass::LightShaderClass(const LightShaderClass& other)
{
}
LightShaderClass::~LightShaderClass()
{
}
bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
Logger::Get().Log("Initializing LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Initialize);
wchar_t vsFilename[128];
wchar_t psFilename[128];
int error;
bool result;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"light.vs");
if (error != 0)
{
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"light.ps");
if (error != 0)
{
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Initialize the vertex and pixel shaders.
result = InitializeShader(device, hwnd, vsFilename, psFilename);
if (!result)
{
Logger::Get().Log("Failed to initialize shader", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
Logger::Get().Log("LightShaderClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
return true;
}
void LightShaderClass::Shutdown()
{
// Shutdown the vertex and pixel shaders as well as the related objects.
ShutdownShader();
return;
}
bool LightShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientClor[])
{
bool result;
// Set the shader parameters that it will use for rendering.
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, diffuseColor, lightPosition, ambientClor);
if(!result)
{
Logger::Get().Log("Failed to set shader parameters", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Now render the prepared buffers with the shader.
RenderShader(deviceContext, indexCount);
return true;
}
bool LightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
{
Logger::Get().Log("Initializing shader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
HRESULT result;
ID3D10Blob* errorMessage;
ID3D10Blob* vertexShaderBuffer;
ID3D10Blob* pixelShaderBuffer;
D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
unsigned int numElements;
D3D11_SAMPLER_DESC samplerDesc;
D3D11_BUFFER_DESC matrixBufferDesc;
D3D11_BUFFER_DESC cameraBufferDesc;
D3D11_BUFFER_DESC lightColorBufferDesc;
D3D11_BUFFER_DESC lightPositionBufferDesc;
// Initialize the pointers this function will use to null.
errorMessage = 0;
vertexShaderBuffer = 0;
pixelShaderBuffer = 0;
// Compile the vertex shader code.
result = D3DCompileFromFile(vsFilename, NULL, NULL, "LightVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
if (FAILED(result))
{
// If the shader failed to compile it should have writen something to the error message.
if (errorMessage)
{
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
}
// If there was nothing in the error message then it simply could not find the shader file itself.
else
{
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
}
return false;
}
// Compile the pixel shader code.
result = D3DCompileFromFile(psFilename, NULL, NULL, "LightPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
if (FAILED(result))
{
// If the shader failed to compile it should have writen something to the error message.
if (errorMessage)
{
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
}
// If there was nothing in the error message then it simply could not find the file itself.
else
{
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
}
return false;
}
// Create the vertex shader from the buffer.
result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), NULL, &m_vertexShader);
if (FAILED(result))
{
Logger::Get().Log("Failed to create vertex shader", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Create the pixel shader from the buffer.
result = device->CreatePixelShader(pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), NULL, &m_pixelShader);
if (FAILED(result))
{
Logger::Get().Log("Failed to create pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Create the vertex input layout description.
// This setup needs to match the VertexType stucture in the ModelClass and in the shader.
polygonLayout[0].SemanticName = "POSITION";
polygonLayout[0].SemanticIndex = 0;
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
polygonLayout[0].InputSlot = 0;
polygonLayout[0].AlignedByteOffset = 0;
polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
polygonLayout[0].InstanceDataStepRate = 0;
polygonLayout[1].SemanticName = "TEXCOORD";
polygonLayout[1].SemanticIndex = 0;
polygonLayout[1].Format = DXGI_FORMAT_R32G32_FLOAT;
polygonLayout[1].InputSlot = 0;
polygonLayout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
polygonLayout[1].InstanceDataStepRate = 0;
polygonLayout[2].SemanticName = "NORMAL";
polygonLayout[2].SemanticIndex = 0;
polygonLayout[2].Format = DXGI_FORMAT_R32G32B32_FLOAT;
polygonLayout[2].InputSlot = 0;
polygonLayout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
polygonLayout[2].InstanceDataStepRate = 0;
// Get a count of the elements in the layout.
numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]);
// Create the vertex input layout.
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(),
&m_layout);
if (FAILED(result))
{
Logger::Get().Log("Failed to create input layout", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
vertexShaderBuffer->Release();
vertexShaderBuffer = 0;
pixelShaderBuffer->Release();
pixelShaderBuffer = 0;
// Create a texture sampler state description.
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MaxAnisotropy = 1;
samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
samplerDesc.BorderColor[0] = 0;
samplerDesc.BorderColor[1] = 0;
samplerDesc.BorderColor[2] = 0;
samplerDesc.BorderColor[3] = 0;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
// Create the texture sampler state.
result = device->CreateSamplerState(&samplerDesc, &m_sampleState);
if (FAILED(result))
{
Logger::Get().Log("Failed to create sampler state", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Setup the description of the dynamic matrix constant buffer that is in the vertex shader.
matrixBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
matrixBufferDesc.ByteWidth = sizeof(MatrixBufferType);
matrixBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
matrixBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
matrixBufferDesc.MiscFlags = 0;
matrixBufferDesc.StructureByteStride = 0;
// Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
result = device->CreateBuffer(&matrixBufferDesc, NULL, &m_matrixBuffer);
if (FAILED(result))
{
Logger::Get().Log("Failed to create matrix buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Setup the description of the camera dynamic constant buffer that is in the vertex shader.
cameraBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
cameraBufferDesc.ByteWidth = sizeof(CameraBufferType);
cameraBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
cameraBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
cameraBufferDesc.MiscFlags = 0;
cameraBufferDesc.StructureByteStride = 0;
// Create the camera constant buffer pointer so we can access the vertex shader constant buffer from within this class.
result = device->CreateBuffer(&cameraBufferDesc, NULL, &m_cameraBuffer);
if (FAILED(result))
{
Logger::Get().Log("Failed to create camera buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Setup the description of the dynamic constant buffer that is in the pixel shader.
lightColorBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
lightColorBufferDesc.ByteWidth = sizeof(LightColorBufferType);
lightColorBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
lightColorBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
lightColorBufferDesc.MiscFlags = 0;
lightColorBufferDesc.StructureByteStride = 0;
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
result = device->CreateBuffer(&lightColorBufferDesc, NULL, &m_lightColorBuffer);
if (FAILED(result))
{
Logger::Get().Log("Failed to create light color buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Setup the description of the dynamic constant buffer that is in the vertex shader.
lightPositionBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
lightPositionBufferDesc.ByteWidth = sizeof(LightPositionBufferType);
lightPositionBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
lightPositionBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
lightPositionBufferDesc.MiscFlags = 0;
lightPositionBufferDesc.StructureByteStride = 0;
// Create the constant buffer pointer so we can access the vertex shader constant buffer from within this class.
result = device->CreateBuffer(&lightPositionBufferDesc, NULL, &m_lightPositionBuffer);
if (FAILED(result))
{
Logger::Get().Log("Failed to create light position buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
Logger::Get().Log("Shader initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
return true;
}
void LightShaderClass::ShutdownShader()
{
Logger::Get().Log("Shutting down LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
// Release the light constant buffers.
if (m_lightColorBuffer)
{
m_lightColorBuffer->Release();
m_lightColorBuffer = 0;
}
if (m_lightPositionBuffer)
{
m_lightPositionBuffer->Release();
m_lightPositionBuffer = 0;
}
// Release the light constant buffer.
if (m_lightBuffer)
{
m_lightBuffer->Release();
m_lightBuffer = 0;
}
// Release the camera constant buffer.
if (m_cameraBuffer)
{
m_cameraBuffer->Release();
m_cameraBuffer = 0;
}
// Release the matrix constant buffer.
if (m_matrixBuffer)
{
m_matrixBuffer->Release();
m_matrixBuffer = 0;
}
// Release the sampler state.
if (m_sampleState)
{
m_sampleState->Release();
m_sampleState = 0;
}
// Release the layout.
if (m_layout)
{
m_layout->Release();
m_layout = 0;
}
// Release the pixel shader.
if (m_pixelShader)
{
m_pixelShader->Release();
m_pixelShader = 0;
}
// Release the vertex shader.
if (m_vertexShader)
{
m_vertexShader->Release();
m_vertexShader = 0;
}
Logger::Get().Log("LightShaderClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
return;
}
void LightShaderClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
{
char* compileErrors;
unsigned __int64 bufferSize, i;
ofstream fout;
// Get a pointer to the error message text buffer.
compileErrors = (char*)(errorMessage->GetBufferPointer());
// Get the length of the message.
bufferSize = errorMessage->GetBufferSize();
// Open a file to write the error message to.
fout.open("shader-error.txt");
// Write out the error message.
for (i = 0; i < bufferSize; i++)
{
fout << compileErrors[i];
}
// Close the file.
fout.close();
// Release the error message.
errorMessage->Release();
errorMessage = 0;
// Pop a message up on the screen to notify the user to check the text file for compile errors.
MessageBox(hwnd, L"Error compiling shader. Check shader-error.txt for message.", shaderFilename, MB_OK);
return;
}
bool LightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientColor[])
{
HRESULT result;
D3D11_MAPPED_SUBRESOURCE mappedResource;
unsigned int bufferNumber;
MatrixBufferType* dataPtr;
LightPositionBufferType* dataPtr2;
LightColorBufferType* dataPtr3;
// Transpose the matrices to prepare them for the shader.
worldMatrix = XMMatrixTranspose(worldMatrix);
viewMatrix = XMMatrixTranspose(viewMatrix);
projectionMatrix = XMMatrixTranspose(projectionMatrix);
// Lock the constant buffer so it can be written to.
result = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
if (FAILED(result))
{
Logger::Get().Log("Failed to map matrix buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Get a pointer to the data in the constant buffer.
dataPtr = (MatrixBufferType*)mappedResource.pData;
// Copy the matrices into the constant buffer.
dataPtr->world = worldMatrix;
dataPtr->view = viewMatrix;
dataPtr->projection = projectionMatrix;
// Unlock the constant buffer.
deviceContext->Unmap(m_matrixBuffer, 0);
// Set the position of the constant buffer in the vertex shader.
bufferNumber = 0;
// Now set the constant buffer in the vertex shader with the updated values.
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
// Lock the camera constant buffer so it can be written to.
result = deviceContext->Map(m_cameraBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
if (FAILED(result))
{
Logger::Get().Log("Failed to map camera buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Lock the light position constant buffer so it can be written to.
result = deviceContext->Map(m_lightPositionBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
if (FAILED(result))
{
Logger::Get().Log("Failed to map light position buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Get a pointer to the data in the constant buffer.
dataPtr2 = (LightPositionBufferType*)mappedResource.pData;
// Copy the light position variables into the constant buffer.
for (int i = 0; i < NUM_LIGHTS; i++)
{
dataPtr2->lightPosition[i] = lightPosition[i];
}
// Unlock the constant buffer.
deviceContext->Unmap(m_lightPositionBuffer, 0);
// Set the position of the constant buffer in the vertex shader.
bufferNumber = 1;
// Finally set the constant buffer in the vertex shader with the updated values.
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_lightPositionBuffer);
// Set shader texture resource in the pixel shader.
deviceContext->PSSetShaderResources(0, 1, &texture);
// Lock the light color constant buffer so it can be written to.
result = deviceContext->Map(m_lightColorBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
if (FAILED(result))
{
Logger::Get().Log("Failed to map light color buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
return false;
}
// Get a pointer to the data in the constant buffer.
dataPtr3 = (LightColorBufferType*)mappedResource.pData;
// Copy the light color variables into the constant buffer.
for (int i = 0; i < NUM_LIGHTS; i++)
{
dataPtr3->diffuseColor[i] = diffuseColor[i];
}
// Unlock the constant buffer.
deviceContext->Unmap(m_lightColorBuffer, 0);
// Set the position of the constant buffer in the pixel shader.
bufferNumber = 0;
// Finally set the constant buffer in the pixel shader with the updated values.
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_lightColorBuffer);
return true;
}
void LightShaderClass::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
{
// Set the vertex input layout.
deviceContext->IASetInputLayout(m_layout);
// Set the vertex and pixel shaders that will be used to render this triangle.
deviceContext->VSSetShader(m_vertexShader, NULL, 0);
deviceContext->PSSetShader(m_pixelShader, NULL, 0);
// Set the sampler state in the pixel shader.
deviceContext->PSSetSamplers(0, 1, &m_sampleState);
// Render the triangle.
deviceContext->DrawIndexed(indexCount, 0, 0);
return;
}

View File

@ -1,92 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
// Filename: lightshaderclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _LIGHTSHADERCLASS_H_
#define _LIGHTSHADERCLASS_H_
#pragma once
/////////////
// GLOBALS //
/////////////
const int NUM_LIGHTS = 4;
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <directxmath.h>
#include <fstream>
using namespace DirectX;
using namespace std;
////////////////////////////////////////////////////////////////////////////////
// Class name: LightShaderClass
////////////////////////////////////////////////////////////////////////////////
class LightShaderClass
{
private:
struct MatrixBufferType
{
XMMATRIX world;
XMMATRIX view;
XMMATRIX projection;
};
struct CameraBufferType
{
XMFLOAT3 cameraPosition;
float padding;
};
struct LightBufferType
{
XMFLOAT4 ambientColor;
XMFLOAT4 diffuseColor;
XMFLOAT3 lightDirection;
float padding; // Added extra padding so structure is a multiple of 16 for CreateBuffer function requirements.
float specularPower;
XMFLOAT4 specularColor;
};
struct LightColorBufferType
{
XMFLOAT4 diffuseColor[NUM_LIGHTS];
};
struct LightPositionBufferType
{
XMFLOAT4 lightPosition[NUM_LIGHTS];
};
public:
LightShaderClass();
LightShaderClass(const LightShaderClass&);
~LightShaderClass();
bool Initialize(ID3D11Device*, HWND);
void Shutdown();
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
private:
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
void ShutdownShader();
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT4[], XMFLOAT4[], XMFLOAT4[]);
void RenderShader(ID3D11DeviceContext*, int);
private:
ID3D11VertexShader* m_vertexShader;
ID3D11PixelShader* m_pixelShader;
ID3D11InputLayout* m_layout;
ID3D11SamplerState* m_sampleState;
ID3D11Buffer* m_matrixBuffer;
ID3D11Buffer* m_cameraBuffer;
ID3D11Buffer* m_lightBuffer;
ID3D11Buffer* m_lightColorBuffer;
ID3D11Buffer* m_lightPositionBuffer;
};
#endif

View File

@ -19,69 +19,60 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="alphamapshaderclass.cpp" />
<ClCompile Include="applicationclass.cpp" />
<ClCompile Include="bitmapclass.cpp" />
<ClCompile Include="Cameraclass.cpp" />
<ClCompile Include="CelShadingShader.cpp" />
<ClCompile Include="Colorshaderclass.cpp" />
<ClCompile Include="d3dclass.cpp" />
<ClCompile Include="frustum.cpp" />
<ClCompile Include="imguiManager.cpp" />
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
<ClCompile Include="include\imgui.cpp" />
<ClCompile Include="include\imgui_draw.cpp" />
<ClCompile Include="include\imgui_tables.cpp" />
<ClCompile Include="include\imgui_widgets.cpp" />
<ClCompile Include="displayplaneclass.cpp" />
<ClCompile Include="fontclass.cpp" />
<ClCompile Include="fontshaderclass.cpp" />
<ClCompile Include="fpsclass.cpp" />
<ClCompile Include="frustumclass.cpp" />
<ClCompile Include="include\Src\DDSTextureLoader.cpp" />
<ClCompile Include="include\Src\DirectXHelpers.cpp" />
<ClCompile Include="include\Src\pch.cpp" />
<ClCompile Include="include\Src\SimpleMath.cpp" />
<ClCompile Include="include\Src\WICTextureLoader.cpp" />
<ClCompile Include="inputclass.cpp" />
<ClCompile Include="Lightclass.cpp" />
<ClCompile Include="lightmapshaderclass.cpp" />
<ClCompile Include="Lightshaderclass.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="modelclass.cpp" />
<ClCompile Include="object.cpp" />
<ClCompile Include="modellistclass.cpp" />
<ClCompile Include="Multitextureshaderclass.cpp" />
<ClCompile Include="normalmapshaderclass.cpp" />
<ClCompile Include="refractionshaderclass.cpp" />
<ClCompile Include="shadermanagerclass.cpp" />
<ClCompile Include="physics.cpp" />
<ClCompile Include="positionclass.cpp" />
<ClCompile Include="reflectionshaderclass.cpp" />
<ClCompile Include="rendertextureclass.cpp" />
<ClCompile Include="specmapshaderclass.cpp" />
<ClCompile Include="Spriteclass.cpp" />
<ClCompile Include="sunlightshaderclass.cpp" />
<ClCompile Include="Systemclass.cpp" />
<ClCompile Include="textclass.cpp" />
<ClCompile Include="textureclass.cpp" />
<ClCompile Include="textureshaderclass.cpp" />
<ClCompile Include="Timerclass.cpp" />
<ClCompile Include="translateshaderclass.cpp" />
<ClCompile Include="transparentshaderclass.cpp" />
<ClCompile Include="watershaderclass.cpp" />
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp" />
<ClCompile Include="src\src\shader\CelShadingShader.cpp" />
<ClCompile Include="src\src\shader\Colorshaderclass.cpp" />
<ClCompile Include="src\src\shader\fontshaderclass.cpp" />
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp" />
<ClCompile Include="src\src\shader\lightshaderclass.cpp" />
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp" />
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp" />
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp" />
<ClCompile Include="src\src\shader\refractionshaderclass.cpp" />
<ClCompile Include="src\src\shader\shadermanagerclass.cpp" />
<ClCompile Include="src\src\shader\specmapshaderclass.cpp" />
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp" />
<ClCompile Include="src\src\shader\textureshaderclass.cpp" />
<ClCompile Include="src\src\shader\translateshaderclass.cpp" />
<ClCompile Include="src\src\shader\transparentshaderclass.cpp" />
<ClCompile Include="src\src\shader\watershaderclass.cpp" />
<ClCompile Include="src\src\system\applicationclass.cpp" />
<ClCompile Include="src\src\system\bitmapclass.cpp" />
<ClCompile Include="src\src\system\Cameraclass.cpp" />
<ClCompile Include="src\src\system\d3dclass.cpp" />
<ClCompile Include="src\src\system\displayplaneclass.cpp" />
<ClCompile Include="src\src\system\fontclass.cpp" />
<ClCompile Include="src\src\system\fpsclass.cpp" />
<ClCompile Include="src\src\system\frustum.cpp" />
<ClCompile Include="src\src\system\frustumclass.cpp" />
<ClCompile Include="src\src\system\imguiManager.cpp" />
<ClCompile Include="src\src\system\inputclass.cpp" />
<ClCompile Include="src\src\system\lightclass.cpp" />
<ClCompile Include="src\src\system\Main.cpp" />
<ClCompile Include="src\src\system\modelclass.cpp" />
<ClCompile Include="src\src\system\Modellistclass.cpp" />
<ClCompile Include="src\src\system\object.cpp" />
<ClCompile Include="src\src\system\physics.cpp" />
<ClCompile Include="src\src\system\Positionclass.cpp" />
<ClCompile Include="src\src\system\rendertextureclass.cpp" />
<ClCompile Include="src\src\system\Spriteclass.cpp" />
<ClCompile Include="src\src\system\Systemclass.cpp" />
<ClCompile Include="src\src\system\textclass.cpp" />
<ClCompile Include="src\src\system\textureclass.cpp" />
<ClCompile Include="src\src\system\Timerclass.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="alphamapshaderclass.h" />
<ClInclude Include="applicationclass.h" />
<ClInclude Include="bitmapclass.h" />
<ClInclude Include="Cameraclass.h" />
<ClInclude Include="CelShadingShader.h" />
<ClInclude Include="Colorshaderclass.h" />
<ClInclude Include="d3dclass.h" />
<ClInclude Include="frustum.h" />
<ClInclude Include="imguiManager.h" />
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
<ClInclude Include="include\backends\imgui_impl_win32.h" />
<ClInclude Include="include\imconfig.h" />
@ -90,146 +81,182 @@
<ClInclude Include="include\imstb_rectpack.h" />
<ClInclude Include="include\imstb_textedit.h" />
<ClInclude Include="include\imstb_truetype.h" />
<ClInclude Include="displayplaneclass.h" />
<ClInclude Include="fontclass.h" />
<ClInclude Include="fontshaderclass.h" />
<ClInclude Include="fpsclass.h" />
<ClInclude Include="frustumclass.h" />
<ClInclude Include="include\Src\CMO.h" />
<ClInclude Include="include\Src\DDS.h" />
<ClInclude Include="include\Src\LoaderHelpers.h" />
<ClInclude Include="include\Src\pch.h" />
<ClInclude Include="include\Src\PlatformHelpers.h" />
<ClInclude Include="inputclass.h" />
<ClInclude Include="lightclass.h" />
<ClInclude Include="lightmapshaderclass.h" />
<ClInclude Include="lightshaderclass.h" />
<ClInclude Include="Logger.h" />
<ClInclude Include="modelclass.h" />
<ClInclude Include="object.h" />
<ClInclude Include="modellistclass.h" />
<ClInclude Include="Multitextureshaderclass.h" />
<ClInclude Include="normalmapshaderclass.h" />
<ClInclude Include="refractionshaderclass.h" />
<ClInclude Include="shadermanagerclass.h" />
<ClInclude Include="physics.h" />
<ClInclude Include="positionclass.h" />
<ClInclude Include="reflectionshaderclass.h" />
<ClInclude Include="rendertextureclass.h" />
<ClInclude Include="resources.h" />
<ClInclude Include="specmapshaderclass.h" />
<ClInclude Include="Spriteclass.h" />
<ClInclude Include="sunlightshaderclass.h" />
<ClInclude Include="systemclass.h" />
<ClInclude Include="textclass.h" />
<ClInclude Include="textureclass.h" />
<ClInclude Include="textureshaderclass.h" />
<ClInclude Include="Timerclass.h" />
<ClInclude Include="translateshaderclass.h" />
<ClInclude Include="transparentshaderclass.h" />
<ClInclude Include="watershaderclass.h" />
<ClInclude Include="src\inc\shader\alphamapshaderclass.h" />
<ClInclude Include="src\inc\shader\CelShadingShader.h" />
<ClInclude Include="src\inc\shader\Colorshaderclass.h" />
<ClInclude Include="src\inc\shader\fontshaderclass.h" />
<ClInclude Include="src\inc\shader\lightmapshaderclass.h" />
<ClInclude Include="src\inc\shader\lightshaderclass.h" />
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h" />
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h" />
<ClInclude Include="src\inc\shader\normalmapshaderclass.h" />
<ClInclude Include="src\inc\shader\reflectionshaderclass.h" />
<ClInclude Include="src\inc\shader\refractionshaderclass.h" />
<ClInclude Include="src\inc\shader\shadermanagerclass.h" />
<ClInclude Include="src\inc\shader\specmapshaderclass.h" />
<ClInclude Include="src\inc\shader\sunlightshaderclass.h" />
<ClInclude Include="src\inc\shader\textureshaderclass.h" />
<ClInclude Include="src\inc\shader\translateshaderclass.h" />
<ClInclude Include="src\inc\shader\transparentshaderclass.h" />
<ClInclude Include="src\inc\shader\watershaderclass.h" />
<ClInclude Include="src\inc\system\applicationclass.h" />
<ClInclude Include="src\inc\system\bitmapclass.h" />
<ClInclude Include="src\inc\system\Cameraclass.h" />
<ClInclude Include="src\inc\system\d3dclass.h" />
<ClInclude Include="src\inc\system\displayplaneclass.h" />
<ClInclude Include="src\inc\system\fontclass.h" />
<ClInclude Include="src\inc\system\fpsclass.h" />
<ClInclude Include="src\inc\system\frustum.h" />
<ClInclude Include="src\inc\system\frustumclass.h" />
<ClInclude Include="src\inc\system\imguiManager.h" />
<ClInclude Include="src\inc\system\inputclass.h" />
<ClInclude Include="src\inc\system\lightclass.h" />
<ClInclude Include="src\inc\system\Logger.h" />
<ClInclude Include="src\inc\system\modelclass.h" />
<ClInclude Include="src\inc\system\Modellistclass.h" />
<ClInclude Include="src\inc\system\object.h" />
<ClInclude Include="src\inc\system\physics.h" />
<ClInclude Include="src\inc\system\Positionclass.h" />
<ClInclude Include="src\inc\system\rendertextureclass.h" />
<ClInclude Include="src\inc\system\Spriteclass.h" />
<ClInclude Include="src\inc\system\systemclass.h" />
<ClInclude Include="src\inc\system\textclass.h" />
<ClInclude Include="src\inc\system\textureclass.h" />
<ClInclude Include="src\inc\system\Timerclass.h" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="alphamap.ps">
<CopyFileToFolders Include="src\hlsl\alphamap.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="alphamap.vs">
<CopyFileToFolders Include="src\hlsl\alphamap.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="font.ps">
<CopyFileToFolders Include="src\hlsl\celshading.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="font.vs">
<CopyFileToFolders Include="src\hlsl\celshading.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="light.ps">
<CopyFileToFolders Include="src\hlsl\Color.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="light.vs">
<CopyFileToFolders Include="src\hlsl\Color.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="lightmap.ps">
<CopyFileToFolders Include="src\hlsl\font.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="lightmap.vs">
<CopyFileToFolders Include="src\hlsl\font.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="Multitexture.ps">
<CopyFileToFolders Include="src\hlsl\light.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="Multitexture.vs">
<CopyFileToFolders Include="src\hlsl\light.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="normalmap.ps">
<CopyFileToFolders Include="src\hlsl\lightmap.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="normalmap.vs">
<CopyFileToFolders Include="src\hlsl\lightmap.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
<CopyFileToFolders Include="src\hlsl\Multitexture.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="celshading.ps">
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="celshading.vs">
<CopyFileToFolders Include="src\hlsl\normalmap.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<None Include="packages.config" />
<CopyFileToFolders Include="reflection.ps">
<CopyFileToFolders Include="src\hlsl\normalmap.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="reflection.vs">
<CopyFileToFolders Include="src\hlsl\reflection.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="specmap.ps">
<CopyFileToFolders Include="src\hlsl\reflection.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="specmap.vs">
<CopyFileToFolders Include="src\hlsl\refraction.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="texture.ps">
<CopyFileToFolders Include="src\hlsl\refraction.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="texture.vs">
<CopyFileToFolders Include="src\hlsl\specmap.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="transparent.ps">
<CopyFileToFolders Include="src\hlsl\specmap.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="transparent.vs">
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="refraction.ps">
<CopyFileToFolders Include="src\hlsl\sunlight.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="refraction.vs">
<CopyFileToFolders Include="src\hlsl\texture.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="water.vs">
<CopyFileToFolders Include="src\hlsl\texture.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="sunlight.ps">
<CopyFileToFolders Include="src\hlsl\translate.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="sunlight.vs">
<CopyFileToFolders Include="src\hlsl\translate.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="Color.ps">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
<CopyFileToFolders Include="src\hlsl\transparent.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="Color.vs">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
<CopyFileToFolders Include="src\hlsl\transparent.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\water.ps">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\water.vs">
<FileType>Document</FileType>
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
@ -349,16 +376,6 @@
<ItemGroup>
<CopyFileToFolders Include="font01.txt" />
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="translate.ps">
<SubType>Designer</SubType>
<FileType>Document</FileType>
</CopyFileToFolders>
<CopyFileToFolders Include="translate.vs">
<SubType>Designer</SubType>
<FileType>Document</FileType>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resources.rc" />
</ItemGroup>
@ -524,7 +541,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
@ -541,7 +558,7 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -52,9 +52,6 @@
<Filter Include="Fichiers d%27en-tête\Shader">
<UniqueIdentifier>{e087647e-a306-4246-9320-bab0830bb634}</UniqueIdentifier>
</Filter>
<Filter Include="Fichiers d%27en-tête\System">
<UniqueIdentifier>{14b07251-cf6d-4391-9fca-ec94e08d4427}</UniqueIdentifier>
</Filter>
<Filter Include="Fichiers sources\Shader">
<UniqueIdentifier>{3c669b93-a9fd-4b74-813f-f9780413f76b}</UniqueIdentifier>
</Filter>
@ -64,11 +61,11 @@
<Filter Include="Assets\Skybox">
<UniqueIdentifier>{4bfa47c6-e23c-4cae-a7af-3fc870a448e4}</UniqueIdentifier>
</Filter>
<Filter Include="Fichiers d%27en-tête\System">
<UniqueIdentifier>{567548ae-97a4-413e-8d44-86d6e8252487}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="include\backends\imgui_impl_dx11.cpp">
<Filter>Fichiers sources\ImGui</Filter>
</ClCompile>
@ -87,33 +84,6 @@
<ClCompile Include="include\imgui_widgets.cpp">
<Filter>Fichiers sources\ImGui</Filter>
</ClCompile>
<ClCompile Include="bitmapclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fontclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fpsclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Spriteclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="textclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fpsclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="frustumclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="modellistclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="displayplaneclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="include\Src\DDSTextureLoader.cpp">
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
</ClCompile>
@ -129,107 +99,131 @@
<ClCompile Include="include\Src\WICTextureLoader.cpp">
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
</ClCompile>
<ClCompile Include="alphamapshaderclass.cpp">
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="CelShadingShader.cpp">
<ClCompile Include="src\src\shader\CelShadingShader.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="Colorshaderclass.cpp">
<ClCompile Include="src\src\shader\Colorshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="fontshaderclass.cpp">
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="lightmapshaderclass.cpp">
<ClCompile Include="src\src\shader\lightshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="Lightshaderclass.cpp">
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="Multitextureshaderclass.cpp">
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="normalmapshaderclass.cpp">
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="reflectionshaderclass.cpp">
<ClCompile Include="src\src\shader\refractionshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="refractionshaderclass.cpp">
<ClCompile Include="src\src\shader\shadermanagerclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="shadermanagerclass.cpp">
<ClCompile Include="src\src\shader\specmapshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="specmapshaderclass.cpp">
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="watershaderclass.cpp">
<ClCompile Include="src\src\shader\textureshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="transparentshaderclass.cpp">
<ClCompile Include="src\src\shader\translateshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="translateshaderclass.cpp">
<ClCompile Include="src\src\shader\transparentshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="textureshaderclass.cpp">
<ClCompile Include="src\src\shader\watershaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
<ClCompile Include="applicationclass.cpp">
<ClCompile Include="src\src\system\applicationclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="Cameraclass.cpp">
<ClCompile Include="src\src\system\bitmapclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="d3dclass.cpp">
<ClCompile Include="src\src\system\Cameraclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="imguiManager.cpp">
<ClCompile Include="src\src\system\d3dclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="inputclass.cpp">
<ClCompile Include="src\src\system\displayplaneclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="Lightclass.cpp">
<ClCompile Include="src\src\system\fontclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="object.cpp">
<ClCompile Include="src\src\system\fpsclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="physics.cpp">
<ClCompile Include="src\src\system\frustum.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="modelclass.cpp">
<ClCompile Include="src\src\system\frustumclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="positionclass.cpp">
<ClCompile Include="src\src\system\imguiManager.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="rendertextureclass.cpp">
<ClCompile Include="src\src\system\inputclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="Systemclass.cpp">
<ClCompile Include="src\src\system\lightclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="Timerclass.cpp">
<ClCompile Include="src\src\system\Main.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="textureclass.cpp">
<ClCompile Include="src\src\system\modelclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="frustum.cpp">
<ClCompile Include="src\src\system\Modellistclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="sunlightshaderclass.cpp">
<ClCompile Include="src\src\system\object.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\physics.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Positionclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\rendertextureclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Spriteclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Systemclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\textclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\textureclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\system\Timerclass.cpp">
<Filter>Fichiers sources\System</Filter>
</ClCompile>
<ClCompile Include="src\src\shader\fontshaderclass.cpp">
<Filter>Fichiers sources\Shader</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="systemclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="include\imconfig.h">
<Filter>Fichiers d%27en-tête\ImGui</Filter>
</ClInclude>
@ -254,33 +248,6 @@
<ClInclude Include="include\backends\imgui_impl_win32.h">
<Filter>Fichiers d%27en-tête\ImGui</Filter>
</ClInclude>
<ClInclude Include="bitmapclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fontclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fpsclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="Spriteclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="textclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fpsclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="frustumclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="modellistclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="displayplaneclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="include\Src\CMO.h">
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
</ClInclude>
@ -296,104 +263,131 @@
<ClInclude Include="include\Src\PlatformHelpers.h">
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
</ClInclude>
<ClInclude Include="alphamapshaderclass.h">
<ClInclude Include="src\inc\shader\alphamapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="CelShadingShader.h">
<ClInclude Include="src\inc\shader\CelShadingShader.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="Colorshaderclass.h">
<ClInclude Include="src\inc\shader\Colorshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="fontshaderclass.h">
<ClInclude Include="src\inc\shader\fontshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="lightmapshaderclass.h">
<ClInclude Include="src\inc\shader\lightmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="lightshaderclass.h">
<ClInclude Include="src\inc\shader\lightshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="Multitextureshaderclass.h">
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="normalmapshaderclass.h">
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="reflectionshaderclass.h">
<ClInclude Include="src\inc\shader\normalmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="refractionshaderclass.h">
<ClInclude Include="src\inc\shader\reflectionshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="shadermanagerclass.h">
<ClInclude Include="src\inc\shader\refractionshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="specmapshaderclass.h">
<ClInclude Include="src\inc\shader\shadermanagerclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="textureshaderclass.h">
<ClInclude Include="src\inc\shader\specmapshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="translateshaderclass.h">
<ClInclude Include="src\inc\shader\sunlightshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="transparentshaderclass.h">
<ClInclude Include="src\inc\shader\textureshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="watershaderclass.h">
<ClInclude Include="src\inc\shader\translateshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="applicationclass.h">
<ClInclude Include="src\inc\shader\transparentshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\shader\watershaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\applicationclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="d3dclass.h">
<ClInclude Include="src\inc\system\bitmapclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="Cameraclass.h">
<ClInclude Include="src\inc\system\Cameraclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="imguiManager.h">
<ClInclude Include="src\inc\system\d3dclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="Logger.h">
<ClInclude Include="src\inc\system\displayplaneclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="inputclass.h">
<ClInclude Include="src\inc\system\fontclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="lightclass.h">
<ClInclude Include="src\inc\system\fpsclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="modelclass.h">
<ClInclude Include="src\inc\system\frustum.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="physics.h">
<ClInclude Include="src\inc\system\frustumclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="Timerclass.h">
<ClInclude Include="src\inc\system\imguiManager.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="textureclass.h">
<ClInclude Include="src\inc\system\inputclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="resources.h">
<ClInclude Include="src\inc\system\lightclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="rendertextureclass.h">
<ClInclude Include="src\inc\system\Logger.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="positionclass.h">
<ClInclude Include="src\inc\system\modelclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="object.h">
<ClInclude Include="src\inc\system\Modellistclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="frustum.h">
<ClInclude Include="src\inc\system\object.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="sunlightshaderclass.h">
<Filter>Fichiers d%27en-tête\Shader</Filter>
<ClInclude Include="src\inc\system\physics.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Positionclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\rendertextureclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Spriteclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\systemclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\textclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\textureclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
<ClInclude Include="src\inc\system\Timerclass.h">
<Filter>Fichiers d%27en-tête\System</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
@ -401,111 +395,18 @@
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resources.rc">
<Filter>Fichiers de ressources</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="font.vs">
<Filter>Fonts</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="font.ps">
<Filter>Fonts</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="Color.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="light.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="font01.txt">
<Filter>Fonts</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="font01.tga">
<Filter>fonts</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="Color.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="light.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="lightmap.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="lightmap.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="reflection.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="reflection.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="translate.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="translate.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="transparent.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="transparent.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="Multitexture.ps">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="Multitexture.vs">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="normalmap.ps">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="normalmap.vs">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="specmap.ps">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="specmap.vs">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="texture.ps">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="texture.vs">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="alphamap.vs">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="alphamap.ps">
<Filter>Texture</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="refraction.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="refraction.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="water.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="celshading.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="celshading.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
<Filter>Assets\Model\TXT</Filter>
</CopyFileToFolders>
@ -650,11 +551,37 @@
<CopyFileToFolders Include="assets\Skybox\skybox_top.png">
<Filter>Assets\Skybox</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="sunlight.ps">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="sunlight.vs">
<Filter>shader</Filter>
</CopyFileToFolders>
<CopyFileToFolders Include="src\hlsl\alphamap.ps" />
<CopyFileToFolders Include="src\hlsl\alphamap.vs" />
<CopyFileToFolders Include="src\hlsl\celshading.ps" />
<CopyFileToFolders Include="src\hlsl\celshading.vs" />
<CopyFileToFolders Include="src\hlsl\Color.ps" />
<CopyFileToFolders Include="src\hlsl\Color.vs" />
<CopyFileToFolders Include="src\hlsl\font.ps" />
<CopyFileToFolders Include="src\hlsl\font.vs" />
<CopyFileToFolders Include="src\hlsl\light.ps" />
<CopyFileToFolders Include="src\hlsl\light.vs" />
<CopyFileToFolders Include="src\hlsl\lightmap.ps" />
<CopyFileToFolders Include="src\hlsl\lightmap.vs" />
<CopyFileToFolders Include="src\hlsl\Multitexture.ps" />
<CopyFileToFolders Include="src\hlsl\Multitexture.vs" />
<CopyFileToFolders Include="src\hlsl\normalmap.ps" />
<CopyFileToFolders Include="src\hlsl\normalmap.vs" />
<CopyFileToFolders Include="src\hlsl\reflection.ps" />
<CopyFileToFolders Include="src\hlsl\reflection.vs" />
<CopyFileToFolders Include="src\hlsl\refraction.ps" />
<CopyFileToFolders Include="src\hlsl\refraction.vs" />
<CopyFileToFolders Include="src\hlsl\specmap.ps" />
<CopyFileToFolders Include="src\hlsl\specmap.vs" />
<CopyFileToFolders Include="src\hlsl\sunlight.ps" />
<CopyFileToFolders Include="src\hlsl\sunlight.vs" />
<CopyFileToFolders Include="src\hlsl\texture.ps" />
<CopyFileToFolders Include="src\hlsl\texture.vs" />
<CopyFileToFolders Include="src\hlsl\translate.ps" />
<CopyFileToFolders Include="src\hlsl\translate.vs" />
<CopyFileToFolders Include="src\hlsl\transparent.ps" />
<CopyFileToFolders Include="src\hlsl\transparent.vs" />
<CopyFileToFolders Include="src\hlsl\water.ps" />
<CopyFileToFolders Include="src\hlsl\water.vs" />
</ItemGroup>
</Project>

View File

@ -44,8 +44,8 @@ Size=1584,861
Collapsed=0
[Window][Render Window]
Pos=300,27
Size=878,826
Pos=8,27
Size=1170,826
Collapsed=0
DockId=0x00000002,0

View File

@ -9,7 +9,7 @@
#include "applicationclass.h"
#include "imguiManager.h"
#include <mutex>
#include "resources.h"
#include "../resources.h"
#include <chrono>
class SystemClass

View File

@ -29,7 +29,7 @@ bool CelShadingShader::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"celshading.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/celshading.vs");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__);
@ -37,7 +37,7 @@ bool CelShadingShader::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"celshading.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/celshading.ps");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__);

View File

@ -32,7 +32,7 @@ bool ColorShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"../enginecustom/Color.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/Color.vs");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -40,7 +40,7 @@ bool ColorShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"../enginecustom/Color.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/Color.ps");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -34,7 +34,7 @@ bool MultiTextureShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"multitexture.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/multitexture.vs");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -42,7 +42,7 @@ bool MultiTextureShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"multitexture.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/multitexture.ps");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -31,7 +31,7 @@ bool AlphaMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"alphamap.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/alphamap.vs");
if (error != 0)
{
Logger::Get().Log("Error copying string ", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -39,7 +39,7 @@ bool AlphaMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"alphamap.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/alphamap.ps");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -32,7 +32,7 @@ bool FontShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"font.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/font.vs");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -40,7 +40,7 @@ bool FontShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"font.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/font.ps");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -31,7 +31,7 @@ bool LightMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"lightmap.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/lightmap.vs");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -39,7 +39,7 @@ bool LightMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"lightmap.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/lightmap.ps");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -38,7 +38,7 @@ bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
bool result;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"light.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/light.vs");
if (error != 0)
{
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -46,7 +46,7 @@ bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"light.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/light.ps");
if (error != 0)
{
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -32,7 +32,7 @@ bool NormalMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"normalmap.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/normalmap.vs");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__);
@ -40,7 +40,7 @@ bool NormalMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"normalmap.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/normalmap.ps");
if (error != 0)
{
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__);

View File

@ -29,7 +29,7 @@ bool ReflectionShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"../Engine/reflection.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/reflection.vs");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
@ -37,7 +37,7 @@ bool ReflectionShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"../Engine/reflection.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/reflection.ps");
if (error != 0)
{
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);

View File

@ -31,14 +31,14 @@ bool RefractionShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
int error;
// Set the filename of the vertex shader.
error = wcscpy_s(vsFilename, 128, L"refraction.vs");
error = wcscpy_s(vsFilename, 128, L"src/hlsl/refraction.vs");
if (error != 0)
{
return false;
}
// Set the filename of the pixel shader.
error = wcscpy_s(psFilename, 128, L"refraction.ps");
error = wcscpy_s(psFilename, 128, L"src/hlsl/refraction.ps");
if (error != 0)
{
return false;

Some files were not shown because too many files have changed in this diff Show More