Compare commits
1 Commits
Test-01
...
Cel-Shadin
Author | SHA1 | Date | |
---|---|---|---|
cabf9b39d8 |
6
.gitignore
vendored
@@ -12,7 +12,11 @@
|
|||||||
*.obj
|
*.obj
|
||||||
|
|
||||||
# Don't ignore 3d model in OBJ
|
# Don't ignore 3d model in OBJ
|
||||||
!enginecustom/assets/Model/OBJ/*.obj
|
!enginecustom/monke.obj
|
||||||
|
!enginecustom/isosphere.obj
|
||||||
|
!enginecustom/cone.obj
|
||||||
|
!enginecustom/vaisseau.obj
|
||||||
|
!enginecustom/86.obj
|
||||||
|
|
||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
*.gch
|
*.gch
|
||||||
|
1
.idea/.idea.KhaoticEngineReborn/.idea/.name
generated
@@ -1 +0,0 @@
|
|||||||
KhaoticEngineReborn
|
|
14
.idea/.idea.KhaoticEngineReborn/.idea/discord.xml
generated
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="DiscordProjectSettings">
|
|
||||||
<option name="show" value="PROJECT_FILES" />
|
|
||||||
<option name="description" value="" />
|
|
||||||
<option name="applicationTheme" value="default" />
|
|
||||||
<option name="iconsTheme" value="default" />
|
|
||||||
<option name="button1Title" value="" />
|
|
||||||
<option name="button1Url" value="" />
|
|
||||||
<option name="button2Title" value="" />
|
|
||||||
<option name="button2Url" value="" />
|
|
||||||
<option name="customApplicationId" value="" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" charset="windows-1252" />
|
|
||||||
<file url="file://$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" charset="windows-1252" />
|
|
||||||
<file url="PROJECT" charset="windows-1252" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="GitToolBoxBlameSettings">
|
|
||||||
<option name="version" value="2" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="GitToolBoxProjectSettings">
|
|
||||||
<option name="commitMessageIssueKeyValidationOverride">
|
|
||||||
<BoolValueOverride>
|
|
||||||
<option name="enabled" value="true" />
|
|
||||||
</BoolValueOverride>
|
|
||||||
</option>
|
|
||||||
<option name="commitMessageValidationEnabledOverride">
|
|
||||||
<BoolValueOverride>
|
|
||||||
<option name="enabled" value="true" />
|
|
||||||
</BoolValueOverride>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="UserContentModel">
|
|
||||||
<attachedFolders />
|
|
||||||
<explicitIncludes />
|
|
||||||
<explicitExcludes />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="MaterialThemeProjectNewConfig">
|
|
||||||
<option name="metadata">
|
|
||||||
<MTProjectMetadataState>
|
|
||||||
<option name="migrated" value="true" />
|
|
||||||
<option name="pristineConfig" value="false" />
|
|
||||||
<option name="userId" value="4025287c:194ad69ad19:-7ff7" />
|
|
||||||
</MTProjectMetadataState>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,7 +0,0 @@
|
|||||||
<?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>
|
|
6
.idea/.idea.KhaoticEngineReborn/.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
206
.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml
generated
@@ -1,206 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="AutoImportSettings">
|
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
|
||||||
</component>
|
|
||||||
<component name="ChangeListManager">
|
|
||||||
<list default="true" id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="">
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/shader-error.txt" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/shader-error.txt" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/hlsl/font.ps" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/hlsl/font.ps" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/hlsl/font.vs" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/hlsl/font.vs" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/imguiManager.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/shader/fontshaderclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/shader/fontshaderclass.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" afterDir="false" />
|
|
||||||
</list>
|
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
||||||
</component>
|
|
||||||
<component name="DpaMonitoringSettings">
|
|
||||||
<option name="firstShow" value="false" />
|
|
||||||
</component>
|
|
||||||
<component name="Git.Settings">
|
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
||||||
</component>
|
|
||||||
<component name="HighlightingSettingsPerFile">
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="cidr-memory-view://5" root0="FORCE_HIGHLIGHTING" />
|
|
||||||
<setting file="file://C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um/d3d11.h" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="file://$PROJECT_DIR$/enginecustom/src/src/shader/CelShadingShader.cpp" root0="FORCE_HIGHLIGHTING" />
|
|
||||||
</component>
|
|
||||||
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
|
|
||||||
<component name="ProblemsViewState">
|
|
||||||
<option name="selectedTabId" value="CurrentFile" />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectColorInfo">{
|
|
||||||
"associatedIndex": 6
|
|
||||||
}</component>
|
|
||||||
<component name="ProjectId" id="2sGIWDeT5ixyzDQ0he4A3RFpG9W" />
|
|
||||||
<component name="ProjectViewState">
|
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
|
||||||
<option name="showLibraryContents" value="true" />
|
|
||||||
</component>
|
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
|
||||||
"keyToString": {
|
|
||||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
|
||||||
"C++ Project.enginecustom.executor": "Run",
|
|
||||||
"C/C++ Project.enginecustom.executor": "Run",
|
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
|
||||||
"git-widget-placeholder": "main",
|
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
|
||||||
"node.js.detected.package.eslint": "true",
|
|
||||||
"node.js.detected.package.tslint": "true",
|
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
|
||||||
"nodejs_package_manager_path": "npm",
|
|
||||||
"settings.editor.selected.configurable": "preferences.keymap",
|
|
||||||
"vue.rearranger.settings.migration": "true"
|
|
||||||
}
|
|
||||||
}]]></component>
|
|
||||||
<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>
|
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
||||||
<component name="TaskManager">
|
|
||||||
<task active="true" id="Default" summary="Default task">
|
|
||||||
<changelist id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="" />
|
|
||||||
<created>1738075515913</created>
|
|
||||||
<option name="number" value="Default" />
|
|
||||||
<option name="presentableId" value="Default" />
|
|
||||||
<updated>1738075515913</updated>
|
|
||||||
<workItem from="1738075517746" duration="553000" />
|
|
||||||
<workItem from="1738076088229" duration="80000" />
|
|
||||||
<workItem from="1738076192788" duration="19000" />
|
|
||||||
<workItem from="1738076222547" duration="6131000" />
|
|
||||||
<workItem from="1738171504772" duration="876000" />
|
|
||||||
<workItem from="1738172392786" duration="67000" />
|
|
||||||
<workItem from="1738173151768" duration="2361000" />
|
|
||||||
<workItem from="1738175535254" duration="279000" />
|
|
||||||
<workItem from="1738178991872" duration="2736000" />
|
|
||||||
<workItem from="1738244577624" duration="3000" />
|
|
||||||
<workItem from="1738321399968" duration="689000" />
|
|
||||||
<workItem from="1738358054789" duration="9000" />
|
|
||||||
<workItem from="1738358091089" duration="6675000" />
|
|
||||||
<workItem from="1738364887298" duration="2275000" />
|
|
||||||
<workItem from="1738515031789" duration="14018000" />
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00001" summary="Minor update - viewport window tweak">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1738175474520</created>
|
|
||||||
<option name="number" value="00001" />
|
|
||||||
<option name="presentableId" value="LOCAL-00001" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1738175474520</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00002" summary="Patch update - add menu button">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1738181617050</created>
|
|
||||||
<option name="number" value="00002" />
|
|
||||||
<option name="presentableId" value="LOCAL-00002" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1738181617050</updated>
|
|
||||||
</task>
|
|
||||||
<option name="localTasksCounter" value="3" />
|
|
||||||
<servers />
|
|
||||||
</component>
|
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
|
||||||
<option name="version" value="3" />
|
|
||||||
</component>
|
|
||||||
<component name="UnityCheckinConfiguration" checkUnsavedScenes="true" />
|
|
||||||
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
|
||||||
<option name="TAB_STATES">
|
|
||||||
<map>
|
|
||||||
<entry key="MAIN">
|
|
||||||
<value>
|
|
||||||
<State />
|
|
||||||
</value>
|
|
||||||
</entry>
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="VcsManagerConfiguration">
|
|
||||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
|
||||||
<MESSAGE value="Minor update - viewport window tweak" />
|
|
||||||
<MESSAGE value="Patch update - add menu button" />
|
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Patch update - add menu button" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
17
README.md
@@ -35,24 +35,11 @@ This **DirectX11** based engine uses **ImGui** with an abstraction layer to enab
|
|||||||
|
|
||||||
**SHADER** :
|
**SHADER** :
|
||||||
|
|
||||||
+ Sunlight shader
|
- Cel Shading
|
||||||
+ Cel Shading (Work In Progress)
|
|
||||||
|
|
||||||
**Interface Graphique** :
|
**Interface Graphique** :
|
||||||
|
|
||||||
+ Console link to the Logger object
|
- Shader Manager
|
||||||
+ Shader Manager
|
|
||||||
+ Engine Settings
|
|
||||||
|
|
||||||
**Texture File** :
|
|
||||||
|
|
||||||
+ All the format supported by Windows Imaging Component (WIC)
|
|
||||||
|
|
||||||
**Optimization** :
|
|
||||||
|
|
||||||
- Shader rendering
|
|
||||||
- Frustum culling
|
|
||||||
- Object rendering
|
|
||||||
|
|
||||||
## Demo :
|
## Demo :
|
||||||
|
|
||||||
|
18
enginecustom/.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "windows-gcc-x64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "gcc",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
@@ -1,90 +1,77 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
#include "CelShadingShader.h"
|
||||||
// Filename: lightshaderclass.cpp
|
#include <iostream>
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#include "sunlightshaderclass.h"
|
|
||||||
|
|
||||||
|
CelShadingShader::CelShadingShader()
|
||||||
SunlightShaderClass::SunlightShaderClass()
|
|
||||||
{
|
{
|
||||||
m_vertexShader = 0;
|
m_vertexShader = 0;
|
||||||
m_pixelShader = 0;
|
m_pixelShader = 0;
|
||||||
m_layout = 0;
|
m_layout = 0;
|
||||||
m_sampleState = 0;
|
|
||||||
m_matrixBuffer = 0;
|
m_matrixBuffer = 0;
|
||||||
m_cameraBuffer = 0;
|
m_sampleState = 0;
|
||||||
m_sunlightBuffer = 0;
|
m_lightBuffer = 0;
|
||||||
m_sunlightColorBuffer = 0;
|
|
||||||
m_sunlightPositionBuffer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CelShadingShader::CelShadingShader(const CelShadingShader& other)
|
||||||
SunlightShaderClass::SunlightShaderClass(const SunlightShaderClass& other)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CelShadingShader::~CelShadingShader()
|
||||||
SunlightShaderClass::~SunlightShaderClass()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CelShadingShader::Initialize(ID3D11Device* device, HWND hwnd)
|
||||||
bool SunlightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Initializing LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("Initializing CelShadingShader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
|
bool result;
|
||||||
wchar_t vsFilename[128];
|
wchar_t vsFilename[128];
|
||||||
wchar_t psFilename[128];
|
wchar_t psFilename[128];
|
||||||
int error;
|
int error;
|
||||||
bool result;
|
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
// Set the filename of the vertex shader.
|
||||||
error = wcscpy_s(vsFilename, 128, L"src/hlsl/sunlight.vs");
|
error = wcscpy_s(vsFilename, 128, L"celshading.vs");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the filename of the pixel shader.
|
// Set the filename of the pixel shader.
|
||||||
error = wcscpy_s(psFilename, 128, L"src/hlsl/sunlight.ps");
|
error = wcscpy_s(psFilename, 128, L"celshading.ps");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the vertex and pixel shaders.
|
// Initialize the vertex and pixel shaders.
|
||||||
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to initialize shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to initialize the vertex and pixel shaders", __FILE__, __LINE__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Get().Log("SunLightShaderClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("Successfully initialized CelShadingShader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CelShadingShader::Shutdown()
|
||||||
void SunlightShaderClass::Shutdown()
|
|
||||||
{
|
{
|
||||||
// Shutdown the vertex and pixel shaders as well as the related objects.
|
// Shutdown the vertex and pixel shaders as well as the related objects.
|
||||||
ShutdownShader();
|
ShutdownShader();
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SunlightShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
bool CelShadingShader::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor, XMFLOAT4 ambientColor, XMFLOAT3 sunDirection, float sunIntensity)
|
ID3D11ShaderResourceView* texture, XMFLOAT3 lightDirection, XMFLOAT4 diffuseColor, XMFLOAT3 lightPosition)
|
||||||
{
|
{
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
|
|
||||||
// Set the shader parameters that it will use for rendering.
|
// Set the shader parameters that it will use for rendering.
|
||||||
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, diffuseColor, ambientColor, sunDirection, sunIntensity);
|
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, lightDirection, diffuseColor, lightPosition);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to set shader parameters", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("CelShading Error", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,92 +81,89 @@ bool SunlightShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CelShadingShader::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
||||||
bool SunlightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Initializing shader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
ID3D10Blob* errorMessage;
|
ID3D10Blob* errorMessage = nullptr;
|
||||||
ID3D10Blob* vertexShaderBuffer;
|
ID3D10Blob* vertexShaderBuffer = nullptr;
|
||||||
ID3D10Blob* pixelShaderBuffer;
|
ID3D10Blob* pixelShaderBuffer = nullptr;
|
||||||
D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
|
D3D11_INPUT_ELEMENT_DESC polygonLayout[3];
|
||||||
unsigned int numElements;
|
unsigned int numElements;
|
||||||
D3D11_SAMPLER_DESC samplerDesc;
|
|
||||||
D3D11_BUFFER_DESC matrixBufferDesc;
|
D3D11_BUFFER_DESC matrixBufferDesc;
|
||||||
D3D11_BUFFER_DESC sunlightBufferDesc;
|
D3D11_SAMPLER_DESC samplerDesc;
|
||||||
|
D3D11_BUFFER_DESC lightBufferDesc;
|
||||||
// Initialize the pointers this function will use to null.
|
|
||||||
errorMessage = 0;
|
|
||||||
vertexShaderBuffer = 0;
|
|
||||||
pixelShaderBuffer = 0;
|
|
||||||
|
|
||||||
// Compile the vertex shader code.
|
// Compile the vertex shader code.
|
||||||
result = D3DCompileFromFile(vsFilename, NULL, NULL, "SunLightVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
result = D3DCompileFromFile(vsFilename, nullptr, nullptr, "CelShadingVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
|
// If the shader failed to compile it should have written something to the error message.
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
{
|
{
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
||||||
}
|
}
|
||||||
|
// If there was nothing in the error message then it simply could not find the shader file itself.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
MessageBox(hwnd, vsFilename, L"Missing Shader File", MB_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile the pixel shader code.
|
// Compile the pixel shader code.
|
||||||
result = D3DCompileFromFile(psFilename, NULL, NULL, "SunLightPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
result = D3DCompileFromFile(psFilename, nullptr, nullptr, "CelShadingPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
|
// If the shader failed to compile it should have written something to the error message.
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
{
|
{
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
||||||
}
|
}
|
||||||
|
// If there was nothing in the error message then it simply could not find the file itself.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
MessageBox(hwnd, psFilename, L"Missing Shader File", MB_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the vertex shader from the buffer.
|
// Create the vertex shader from the buffer.
|
||||||
result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), NULL, &m_vertexShader);
|
result = device->CreateVertexShader(vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), nullptr, &m_vertexShader);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create vertex shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the pixel shader from the buffer.
|
// Create the pixel shader from the buffer.
|
||||||
result = device->CreatePixelShader(pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), NULL, &m_pixelShader);
|
result = device->CreatePixelShader(pixelShaderBuffer->GetBufferPointer(), pixelShaderBuffer->GetBufferSize(), nullptr, &m_pixelShader);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the vertex input layout description.
|
// Create the vertex input layout description.
|
||||||
|
// This setup needs to match the VertexType structure in the ModelClass and in the shader.
|
||||||
polygonLayout[0].SemanticName = "POSITION";
|
polygonLayout[0].SemanticName = "POSITION";
|
||||||
polygonLayout[0].SemanticIndex = 0;
|
polygonLayout[0].SemanticIndex = 0;
|
||||||
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
|
||||||
polygonLayout[0].InputSlot = 0;
|
polygonLayout[0].InputSlot = 0;
|
||||||
polygonLayout[0].AlignedByteOffset = 0;
|
polygonLayout[0].AlignedByteOffset = 0;
|
||||||
polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
polygonLayout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
||||||
polygonLayout[0].InstanceDataStepRate = 0;
|
polygonLayout[0].InstanceDataStepRate = 0;
|
||||||
|
|
||||||
polygonLayout[1].SemanticName = "TEXCOORD";
|
polygonLayout[1].SemanticName = "NORMAL";
|
||||||
polygonLayout[1].SemanticIndex = 0;
|
polygonLayout[1].SemanticIndex = 0;
|
||||||
polygonLayout[1].Format = DXGI_FORMAT_R32G32_FLOAT;
|
polygonLayout[1].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
||||||
polygonLayout[1].InputSlot = 0;
|
polygonLayout[1].InputSlot = 0;
|
||||||
polygonLayout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
polygonLayout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
||||||
polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
polygonLayout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
||||||
polygonLayout[1].InstanceDataStepRate = 0;
|
polygonLayout[1].InstanceDataStepRate = 0;
|
||||||
|
|
||||||
polygonLayout[2].SemanticName = "NORMAL";
|
polygonLayout[2].SemanticName = "TEXCOORD";
|
||||||
polygonLayout[2].SemanticIndex = 0;
|
polygonLayout[2].SemanticIndex = 0;
|
||||||
polygonLayout[2].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
polygonLayout[2].Format = DXGI_FORMAT_R32G32_FLOAT;
|
||||||
polygonLayout[2].InputSlot = 0;
|
polygonLayout[2].InputSlot = 0;
|
||||||
polygonLayout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
polygonLayout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
|
||||||
polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
polygonLayout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
|
||||||
@@ -192,16 +176,30 @@ bool SunlightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHA
|
|||||||
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), &m_layout);
|
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), &m_layout);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create input layout", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
|
// Release the vertex shader buffer and pixel shader buffer since they are no longer needed.
|
||||||
vertexShaderBuffer->Release();
|
vertexShaderBuffer->Release();
|
||||||
vertexShaderBuffer = 0;
|
vertexShaderBuffer = nullptr;
|
||||||
|
|
||||||
pixelShaderBuffer->Release();
|
pixelShaderBuffer->Release();
|
||||||
pixelShaderBuffer = 0;
|
pixelShaderBuffer = nullptr;
|
||||||
|
|
||||||
|
// 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, nullptr, &m_matrixBuffer);
|
||||||
|
if (FAILED(result))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Create a texture sampler state description.
|
// Create a texture sampler state description.
|
||||||
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
||||||
@@ -222,128 +220,78 @@ bool SunlightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHA
|
|||||||
result = device->CreateSamplerState(&samplerDesc, &m_sampleState);
|
result = device->CreateSamplerState(&samplerDesc, &m_sampleState);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create sampler state", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the description of the dynamic matrix constant buffer that is in the vertex shader.
|
// Setup the description of the light dynamic constant buffer that is in the pixel shader.
|
||||||
matrixBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
lightBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
||||||
matrixBufferDesc.ByteWidth = sizeof(MatrixBufferType);
|
lightBufferDesc.ByteWidth = sizeof(LightBufferType);
|
||||||
matrixBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
lightBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
||||||
matrixBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
lightBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||||
matrixBufferDesc.MiscFlags = 0;
|
lightBufferDesc.MiscFlags = 0;
|
||||||
matrixBufferDesc.StructureByteStride = 0;
|
lightBufferDesc.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 dynamic sunlight constant buffer that is in the pixel shader.
|
|
||||||
sunlightBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
sunlightBufferDesc.ByteWidth = sizeof(SunLightBufferType);
|
|
||||||
sunlightBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
sunlightBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
sunlightBufferDesc.MiscFlags = 0;
|
|
||||||
sunlightBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
|
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
|
||||||
result = device->CreateBuffer(&sunlightBufferDesc, NULL, &m_sunlightBuffer);
|
result = device->CreateBuffer(&lightBufferDesc, nullptr, &m_lightBuffer);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create sunlight buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Get().Log("Shader initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CelShadingShader::ShutdownShader()
|
||||||
|
|
||||||
void SunlightShaderClass::ShutdownShader()
|
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Shutting down SunLightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
|
||||||
|
|
||||||
// Release the light constant buffers.
|
|
||||||
if (m_sunlightColorBuffer)
|
|
||||||
{
|
|
||||||
m_sunlightColorBuffer->Release();
|
|
||||||
m_sunlightColorBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_sunlightPositionBuffer)
|
|
||||||
{
|
|
||||||
m_sunlightPositionBuffer->Release();
|
|
||||||
m_sunlightPositionBuffer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the light constant buffer.
|
// Release the light constant buffer.
|
||||||
if (m_sunlightBuffer)
|
if (m_lightBuffer)
|
||||||
{
|
{
|
||||||
m_sunlightBuffer->Release();
|
m_lightBuffer->Release();
|
||||||
m_sunlightBuffer = 0;
|
m_lightBuffer = nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
// 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.
|
// Release the sampler state.
|
||||||
if (m_sampleState)
|
if (m_sampleState)
|
||||||
{
|
{
|
||||||
m_sampleState->Release();
|
m_sampleState->Release();
|
||||||
m_sampleState = 0;
|
m_sampleState = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Release the matrix constant buffer.
|
||||||
|
if (m_matrixBuffer)
|
||||||
|
{
|
||||||
|
m_matrixBuffer->Release();
|
||||||
|
m_matrixBuffer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the layout.
|
// Release the layout.
|
||||||
if (m_layout)
|
if (m_layout)
|
||||||
{
|
{
|
||||||
m_layout->Release();
|
m_layout->Release();
|
||||||
m_layout = 0;
|
m_layout = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the pixel shader.
|
// Release the pixel shader.
|
||||||
if (m_pixelShader)
|
if (m_pixelShader)
|
||||||
{
|
{
|
||||||
m_pixelShader->Release();
|
m_pixelShader->Release();
|
||||||
m_pixelShader = 0;
|
m_pixelShader = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the vertex shader.
|
// Release the vertex shader.
|
||||||
if (m_vertexShader)
|
if (m_vertexShader)
|
||||||
{
|
{
|
||||||
m_vertexShader->Release();
|
m_vertexShader->Release();
|
||||||
m_vertexShader = 0;
|
m_vertexShader = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Get().Log("SunLightShaderClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CelShadingShader::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
||||||
void SunlightShaderClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
|
||||||
{
|
{
|
||||||
char* compileErrors;
|
char* compileErrors;
|
||||||
unsigned __int64 bufferSize, i;
|
unsigned long bufferSize, i;
|
||||||
ofstream fout;
|
std::ofstream fout;
|
||||||
|
|
||||||
|
|
||||||
// Get a pointer to the error message text buffer.
|
// Get a pointer to the error message text buffer.
|
||||||
compileErrors = (char*)(errorMessage->GetBufferPointer());
|
compileErrors = (char*)(errorMessage->GetBufferPointer());
|
||||||
@@ -365,22 +313,20 @@ void SunlightShaderClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWN
|
|||||||
|
|
||||||
// Release the error message.
|
// Release the error message.
|
||||||
errorMessage->Release();
|
errorMessage->Release();
|
||||||
errorMessage = 0;
|
errorMessage = nullptr;
|
||||||
|
|
||||||
// Pop a message up on the screen to notify the user to check the text file for compile errors.
|
// 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);
|
MessageBox(hwnd, L"Error compiling shader. Check shader-error.txt for message.", shaderFilename, MB_OK);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SunlightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix, ID3D11ShaderResourceView* texture, XMFLOAT4 ambientColor, XMFLOAT4 diffuseColor, XMFLOAT3 lightDirection, float sunIntensity)
|
bool CelShadingShader::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
||||||
|
ID3D11ShaderResourceView* texture, XMFLOAT3 lightDirection, XMFLOAT4 diffuseColor, XMFLOAT3 lightPosition)
|
||||||
{
|
{
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
||||||
MatrixBufferType* dataPtr;
|
MatrixBufferType* dataPtr;
|
||||||
CameraBufferType* dataPtr2;
|
LightBufferType* dataPtr2;
|
||||||
SunLightBufferType* dataPtr3;
|
|
||||||
unsigned int bufferNumber;
|
unsigned int bufferNumber;
|
||||||
|
|
||||||
// Transpose the matrices to prepare them for the shader.
|
// Transpose the matrices to prepare them for the shader.
|
||||||
@@ -412,30 +358,32 @@ bool SunlightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext
|
|||||||
// Finally set the constant buffer in the vertex shader with the updated values.
|
// Finally set the constant buffer in the vertex shader with the updated values.
|
||||||
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
||||||
|
|
||||||
// Lock the sunlight constant buffer so it can be written to.
|
// Lock the light constant buffer so it can be written to.
|
||||||
result = deviceContext->Map(m_sunlightBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
result = deviceContext->Map(m_lightBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
// Get a pointer to the data in the constant buffer.
|
||||||
dataPtr3 = (SunLightBufferType*)mappedResource.pData;
|
dataPtr2 = (LightBufferType*)mappedResource.pData;
|
||||||
|
|
||||||
// Copy the lighting variables into the constant buffer.
|
// Copy the lighting variables into the constant buffer.
|
||||||
dataPtr3->ambientColor = ambientColor;
|
dataPtr2->diffuseColor = diffuseColor;
|
||||||
dataPtr3->diffuseColor = diffuseColor;
|
dataPtr2->lightDirection = lightDirection;
|
||||||
dataPtr3->sunDirection = lightDirection;
|
dataPtr2->lightPosition = lightPosition;
|
||||||
dataPtr3->intensity = sunIntensity;
|
dataPtr2->constantAttenuation = 0.5f; // Set your attenuation values here
|
||||||
|
dataPtr2->linearAttenuation = 0.1f;
|
||||||
|
dataPtr2->quadraticAttenuation = 0.01f;
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
// Unlock the constant buffer.
|
||||||
deviceContext->Unmap(m_sunlightBuffer, 0);
|
deviceContext->Unmap(m_lightBuffer, 0);
|
||||||
|
|
||||||
// Set the position of the sunlight constant buffer in the pixel shader.
|
// Set the position of the light constant buffer in the pixel shader.
|
||||||
bufferNumber = 0;
|
bufferNumber = 0;
|
||||||
|
|
||||||
// Finally set the sunlight constant buffer in the pixel shader with the updated values.
|
// Finally set the light constant buffer in the pixel shader with the updated values.
|
||||||
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_sunlightBuffer);
|
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_lightBuffer);
|
||||||
|
|
||||||
// Set shader texture resource in the pixel shader.
|
// Set shader texture resource in the pixel shader.
|
||||||
deviceContext->PSSetShaderResources(0, 1, &texture);
|
deviceContext->PSSetShaderResources(0, 1, &texture);
|
||||||
@@ -443,20 +391,20 @@ bool SunlightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SunlightShaderClass::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
|
||||||
|
|
||||||
|
void CelShadingShader::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
||||||
{
|
{
|
||||||
// Set the vertex input layout.
|
// Set the vertex input layout.
|
||||||
deviceContext->IASetInputLayout(m_layout);
|
deviceContext->IASetInputLayout(m_layout);
|
||||||
|
|
||||||
// Set the vertex and pixel shaders that will be used to render this triangle.
|
// Set the vertex and pixel shaders that will be used to render this triangle.
|
||||||
deviceContext->VSSetShader(m_vertexShader, NULL, 0);
|
deviceContext->VSSetShader(m_vertexShader, nullptr, 0);
|
||||||
deviceContext->PSSetShader(m_pixelShader, NULL, 0);
|
deviceContext->PSSetShader(m_pixelShader, nullptr, 0);
|
||||||
|
|
||||||
// Set the sampler state in the pixel shader.
|
// Set the sampler state in the pixel shader.
|
||||||
deviceContext->PSSetSamplers(0, 1, &m_sampleState);
|
deviceContext->PSSetSamplers(0, 1, &m_sampleState);
|
||||||
|
|
||||||
// Render the triangle.
|
// Render the triangle.
|
||||||
deviceContext->DrawIndexed(indexCount, 0, 0);
|
deviceContext->DrawIndexed(indexCount, 0, 0);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
68
enginecustom/CelShadingShader.h
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#ifndef _CELSHADINGSHADER_H_
|
||||||
|
#define _CELSHADINGSHADER_H_
|
||||||
|
|
||||||
|
//////////////
|
||||||
|
// INCLUDES //
|
||||||
|
//////////////
|
||||||
|
#include "Logger.h"
|
||||||
|
#include <d3d11.h>
|
||||||
|
#include <d3dcompiler.h>
|
||||||
|
#include <directxmath.h>
|
||||||
|
#include <fstream>
|
||||||
|
using namespace DirectX;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Class name: CelShadingShader
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
class CelShadingShader
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
struct MatrixBufferType
|
||||||
|
{
|
||||||
|
XMMATRIX world;
|
||||||
|
XMMATRIX view;
|
||||||
|
XMMATRIX projection;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LightBufferType
|
||||||
|
{
|
||||||
|
XMFLOAT4 diffuseColor;
|
||||||
|
XMFLOAT3 lightDirection;
|
||||||
|
float padding; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
XMFLOAT3 lightPosition; // Add light position
|
||||||
|
float padding2; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
float constantAttenuation;
|
||||||
|
float linearAttenuation;
|
||||||
|
float quadraticAttenuation;
|
||||||
|
float padding3; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
CelShadingShader();
|
||||||
|
CelShadingShader(const CelShadingShader&);
|
||||||
|
~CelShadingShader();
|
||||||
|
|
||||||
|
bool Initialize(ID3D11Device*, HWND);
|
||||||
|
void Shutdown();
|
||||||
|
bool Render(ID3D11DeviceContext*, int, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool InitializeShader(ID3D11Device*, HWND, WCHAR*, WCHAR*);
|
||||||
|
void ShutdownShader();
|
||||||
|
void OutputShaderErrorMessage(ID3D10Blob*, HWND, WCHAR*);
|
||||||
|
|
||||||
|
bool SetShaderParameters(ID3D11DeviceContext*, XMMATRIX, XMMATRIX, XMMATRIX, ID3D11ShaderResourceView*, XMFLOAT3, XMFLOAT4, XMFLOAT3);
|
||||||
|
void RenderShader(ID3D11DeviceContext*, int);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ID3D11VertexShader* m_vertexShader;
|
||||||
|
ID3D11PixelShader* m_pixelShader;
|
||||||
|
ID3D11InputLayout* m_layout;
|
||||||
|
ID3D11Buffer* m_matrixBuffer;
|
||||||
|
ID3D11SamplerState* m_sampleState;
|
||||||
|
ID3D11Buffer* m_lightBuffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -32,7 +32,7 @@ bool ColorShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|||||||
|
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
// Set the filename of the vertex shader.
|
||||||
error = wcscpy_s(vsFilename, 128, L"src/hlsl/Color.vs");
|
error = wcscpy_s(vsFilename, 128, L"../enginecustom/Color.vs");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
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.
|
// Set the filename of the pixel shader.
|
||||||
error = wcscpy_s(psFilename, 128, L"src/hlsl/Color.ps");
|
error = wcscpy_s(psFilename, 128, L"../enginecustom/Color.ps");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
49
enginecustom/Lightclass.h
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
#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();
|
||||||
|
|
||||||
|
private:
|
||||||
|
XMFLOAT4 m_ambientColor;
|
||||||
|
XMFLOAT4 m_diffuseColor;
|
||||||
|
XMFLOAT3 m_direction;
|
||||||
|
XMFLOAT4 m_specularColor;
|
||||||
|
float m_specularPower;
|
||||||
|
XMFLOAT4 m_position;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -1,10 +1,10 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Filename: lightshaderclass.cpp
|
// Filename: lightshaderclass.cpp
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
#include "CelShadingShader.h"
|
#include "lightshaderclass.h"
|
||||||
|
|
||||||
|
|
||||||
CelshadeClass::CelshadeClass()
|
LightShaderClass::LightShaderClass()
|
||||||
{
|
{
|
||||||
m_vertexShader = 0;
|
m_vertexShader = 0;
|
||||||
m_pixelShader = 0;
|
m_pixelShader = 0;
|
||||||
@@ -12,23 +12,23 @@ CelshadeClass::CelshadeClass()
|
|||||||
m_sampleState = 0;
|
m_sampleState = 0;
|
||||||
m_matrixBuffer = 0;
|
m_matrixBuffer = 0;
|
||||||
m_cameraBuffer = 0;
|
m_cameraBuffer = 0;
|
||||||
m_sunlightBuffer = 0;
|
m_lightBuffer = 0;
|
||||||
m_sunlightColorBuffer = 0;
|
m_lightColorBuffer = 0;
|
||||||
m_sunlightPositionBuffer = 0;
|
m_lightPositionBuffer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CelshadeClass::CelshadeClass(const CelshadeClass& other)
|
LightShaderClass::LightShaderClass(const LightShaderClass& other)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CelshadeClass::~CelshadeClass()
|
LightShaderClass::~LightShaderClass()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CelshadeClass::Initialize(ID3D11Device* device, HWND hwnd)
|
bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Initializing LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("Initializing LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
@@ -37,21 +37,21 @@ bool CelshadeClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|||||||
int error;
|
int error;
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
// Set the filename of the vertex shader.
|
||||||
error = wcscpy_s(vsFilename, 128, L"src/hlsl/celshading.vs");
|
error = wcscpy_s(vsFilename, 128, L"light.vs");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the filename of the pixel shader.
|
// Set the filename of the pixel shader.
|
||||||
error = wcscpy_s(psFilename, 128, L"src/hlsl/celshading.ps");
|
error = wcscpy_s(psFilename, 128, L"light.ps");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to copy string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Initialize the vertex and pixel shaders.
|
// Initialize the vertex and pixel shaders.
|
||||||
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
result = InitializeShader(device, hwnd, vsFilename, psFilename);
|
||||||
if (!result)
|
if (!result)
|
||||||
@@ -60,13 +60,13 @@ bool CelshadeClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Get().Log("SunLightShaderClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("LightShaderClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CelshadeClass::Shutdown()
|
void LightShaderClass::Shutdown()
|
||||||
{
|
{
|
||||||
// Shutdown the vertex and pixel shaders as well as the related objects.
|
// Shutdown the vertex and pixel shaders as well as the related objects.
|
||||||
ShutdownShader();
|
ShutdownShader();
|
||||||
@@ -74,19 +74,19 @@ void CelshadeClass::Shutdown()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CelshadeClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
bool LightShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
||||||
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor, XMFLOAT4 ambientColor, XMFLOAT3 sunDirection, float sunIntensity)
|
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientClor[])
|
||||||
{
|
{
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
|
|
||||||
// Set the shader parameters that it will use for rendering.
|
// Set the shader parameters that it will use for rendering.
|
||||||
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, diffuseColor, ambientColor, sunDirection, sunIntensity);
|
result = SetShaderParameters(deviceContext, worldMatrix, viewMatrix, projectionMatrix, texture, diffuseColor, lightPosition, ambientClor);
|
||||||
if (!result)
|
if(!result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to set shader parameters", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to set shader parameters", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now render the prepared buffers with the shader.
|
// Now render the prepared buffers with the shader.
|
||||||
RenderShader(deviceContext, indexCount);
|
RenderShader(deviceContext, indexCount);
|
||||||
@@ -95,7 +95,7 @@ bool CelshadeClass::Render(ID3D11DeviceContext* deviceContext, int indexCount, X
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
bool LightShaderClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsFilename, WCHAR* psFilename)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Initializing shader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("Initializing shader", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
@@ -107,7 +107,10 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
unsigned int numElements;
|
unsigned int numElements;
|
||||||
D3D11_SAMPLER_DESC samplerDesc;
|
D3D11_SAMPLER_DESC samplerDesc;
|
||||||
D3D11_BUFFER_DESC matrixBufferDesc;
|
D3D11_BUFFER_DESC matrixBufferDesc;
|
||||||
D3D11_BUFFER_DESC sunlightBufferDesc;
|
D3D11_BUFFER_DESC cameraBufferDesc;
|
||||||
|
D3D11_BUFFER_DESC lightColorBufferDesc;
|
||||||
|
D3D11_BUFFER_DESC lightPositionBufferDesc;
|
||||||
|
|
||||||
|
|
||||||
// Initialize the pointers this function will use to null.
|
// Initialize the pointers this function will use to null.
|
||||||
errorMessage = 0;
|
errorMessage = 0;
|
||||||
@@ -115,32 +118,38 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
pixelShaderBuffer = 0;
|
pixelShaderBuffer = 0;
|
||||||
|
|
||||||
// Compile the vertex shader code.
|
// Compile the vertex shader code.
|
||||||
result = D3DCompileFromFile(vsFilename, NULL, NULL, "SunLightVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
result = D3DCompileFromFile(vsFilename, NULL, NULL, "LightVertexShader", "vs_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &vertexShaderBuffer, &errorMessage);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
|
// If the shader failed to compile it should have writen something to the error message.
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
{
|
{
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
OutputShaderErrorMessage(errorMessage, hwnd, vsFilename);
|
||||||
}
|
}
|
||||||
|
// If there was nothing in the error message then it simply could not find the shader file itself.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile the pixel shader code.
|
// Compile the pixel shader code.
|
||||||
result = D3DCompileFromFile(psFilename, NULL, NULL, "SunLightPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
result = D3DCompileFromFile(psFilename, NULL, NULL, "LightPixelShader", "ps_5_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &pixelShaderBuffer, &errorMessage);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
|
// If the shader failed to compile it should have writen something to the error message.
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
{
|
{
|
||||||
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
OutputShaderErrorMessage(errorMessage, hwnd, psFilename);
|
||||||
}
|
}
|
||||||
|
// If there was nothing in the error message then it simply could not find the file itself.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to compile shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,6 +170,7 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the vertex input layout description.
|
// 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].SemanticName = "POSITION";
|
||||||
polygonLayout[0].SemanticIndex = 0;
|
polygonLayout[0].SemanticIndex = 0;
|
||||||
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
polygonLayout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
|
||||||
@@ -189,7 +199,8 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]);
|
numElements = sizeof(polygonLayout) / sizeof(polygonLayout[0]);
|
||||||
|
|
||||||
// Create the vertex input layout.
|
// Create the vertex input layout.
|
||||||
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(), &m_layout);
|
result = device->CreateInputLayout(polygonLayout, numElements, vertexShaderBuffer->GetBufferPointer(), vertexShaderBuffer->GetBufferSize(),
|
||||||
|
&m_layout);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create input layout", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to create input layout", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
@@ -242,19 +253,53 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the description of the dynamic sunlight constant buffer that is in the pixel shader.
|
|
||||||
sunlightBufferDesc.Usage = D3D11_USAGE_DYNAMIC;
|
|
||||||
sunlightBufferDesc.ByteWidth = sizeof(SunLightBufferType);
|
|
||||||
sunlightBufferDesc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
|
|
||||||
sunlightBufferDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
|
||||||
sunlightBufferDesc.MiscFlags = 0;
|
|
||||||
sunlightBufferDesc.StructureByteStride = 0;
|
|
||||||
|
|
||||||
// Create the constant buffer pointer so we can access the pixel shader constant buffer from within this class.
|
|
||||||
result = device->CreateBuffer(&sunlightBufferDesc, NULL, &m_sunlightBuffer);
|
// 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))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to create sunlight buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,30 +309,28 @@ bool CelshadeClass::InitializeShader(ID3D11Device* device, HWND hwnd, WCHAR* vsF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LightShaderClass::ShutdownShader()
|
||||||
|
|
||||||
void CelshadeClass::ShutdownShader()
|
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Shutting down SunLightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
Logger::Get().Log("Shutting down LightShaderClass", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
||||||
|
|
||||||
// Release the light constant buffers.
|
// Release the light constant buffers.
|
||||||
if (m_sunlightColorBuffer)
|
if (m_lightColorBuffer)
|
||||||
{
|
{
|
||||||
m_sunlightColorBuffer->Release();
|
m_lightColorBuffer->Release();
|
||||||
m_sunlightColorBuffer = 0;
|
m_lightColorBuffer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_sunlightPositionBuffer)
|
if (m_lightPositionBuffer)
|
||||||
{
|
{
|
||||||
m_sunlightPositionBuffer->Release();
|
m_lightPositionBuffer->Release();
|
||||||
m_sunlightPositionBuffer = 0;
|
m_lightPositionBuffer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the light constant buffer.
|
// Release the light constant buffer.
|
||||||
if (m_sunlightBuffer)
|
if (m_lightBuffer)
|
||||||
{
|
{
|
||||||
m_sunlightBuffer->Release();
|
m_lightBuffer->Release();
|
||||||
m_sunlightBuffer = 0;
|
m_lightBuffer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the camera constant buffer.
|
// Release the camera constant buffer.
|
||||||
@@ -332,13 +375,13 @@ void CelshadeClass::ShutdownShader()
|
|||||||
m_vertexShader = 0;
|
m_vertexShader = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Get().Log("SunLightShaderClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
Logger::Get().Log("LightShaderClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CelshadeClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
void LightShaderClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd, WCHAR* shaderFilename)
|
||||||
{
|
{
|
||||||
char* compileErrors;
|
char* compileErrors;
|
||||||
unsigned __int64 bufferSize, i;
|
unsigned __int64 bufferSize, i;
|
||||||
@@ -374,24 +417,15 @@ void CelshadeClass::OutputShaderErrorMessage(ID3D10Blob* errorMessage, HWND hwnd
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CelshadeClass::SetShaderParameters(
|
bool LightShaderClass::SetShaderParameters(ID3D11DeviceContext* deviceContext, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
||||||
ID3D11DeviceContext* deviceContext,
|
ID3D11ShaderResourceView* texture, XMFLOAT4 diffuseColor[], XMFLOAT4 lightPosition[], XMFLOAT4 ambientColor[])
|
||||||
XMMATRIX worldMatrix,
|
|
||||||
XMMATRIX viewMatrix,
|
|
||||||
XMMATRIX projectionMatrix,
|
|
||||||
ID3D11ShaderResourceView* texture,
|
|
||||||
XMFLOAT4 ambientColor,
|
|
||||||
XMFLOAT4 diffuseColor,
|
|
||||||
XMFLOAT3 lightDirection,
|
|
||||||
float sunIntensity
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
D3D11_MAPPED_SUBRESOURCE mappedResource;
|
||||||
MatrixBufferType* dataPtr;
|
|
||||||
CameraBufferType* dataPtr2;
|
|
||||||
SunLightBufferType* dataPtr3;
|
|
||||||
unsigned int bufferNumber;
|
unsigned int bufferNumber;
|
||||||
|
MatrixBufferType* dataPtr;
|
||||||
|
LightPositionBufferType* dataPtr2;
|
||||||
|
LightColorBufferType* dataPtr3;
|
||||||
|
|
||||||
// Transpose the matrices to prepare them for the shader.
|
// Transpose the matrices to prepare them for the shader.
|
||||||
worldMatrix = XMMatrixTranspose(worldMatrix);
|
worldMatrix = XMMatrixTranspose(worldMatrix);
|
||||||
@@ -402,6 +436,7 @@ bool CelshadeClass::SetShaderParameters(
|
|||||||
result = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
result = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
|
Logger::Get().Log("Failed to map matrix buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,41 +454,78 @@ bool CelshadeClass::SetShaderParameters(
|
|||||||
// Set the position of the constant buffer in the vertex shader.
|
// Set the position of the constant buffer in the vertex shader.
|
||||||
bufferNumber = 0;
|
bufferNumber = 0;
|
||||||
|
|
||||||
// Finally set the constant buffer in the vertex shader with the updated values.
|
// Now set the constant buffer in the vertex shader with the updated values.
|
||||||
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_matrixBuffer);
|
||||||
|
|
||||||
// Lock the sunlight constant buffer so it can be written to.
|
// Lock the camera constant buffer so it can be written to.
|
||||||
result = deviceContext->Map(m_sunlightBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
result = deviceContext->Map(m_cameraBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource);
|
||||||
if (FAILED(result))
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a pointer to the data in the constant buffer.
|
// Get a pointer to the data in the constant buffer.
|
||||||
dataPtr3 = (SunLightBufferType*)mappedResource.pData;
|
dataPtr2 = (LightPositionBufferType*)mappedResource.pData;
|
||||||
|
|
||||||
// Copy the lighting variables into the constant buffer.
|
// Copy the light position variables into the constant buffer.
|
||||||
dataPtr3->ambientColor = ambientColor;
|
for (int i = 0; i < NUM_LIGHTS; i++)
|
||||||
dataPtr3->diffuseColor = diffuseColor;
|
{
|
||||||
dataPtr3->sunDirection = lightDirection;
|
dataPtr2->lightPosition[i] = lightPosition[i];
|
||||||
dataPtr3->intensity = sunIntensity;
|
}
|
||||||
|
|
||||||
// Unlock the constant buffer.
|
// Unlock the constant buffer.
|
||||||
deviceContext->Unmap(m_sunlightBuffer, 0);
|
deviceContext->Unmap(m_lightPositionBuffer, 0);
|
||||||
|
|
||||||
// Set the position of the sunlight constant buffer in the pixel shader.
|
// Set the position of the constant buffer in the vertex shader.
|
||||||
bufferNumber = 0;
|
bufferNumber = 1;
|
||||||
|
|
||||||
// Finally set the sunlight constant buffer in the pixel shader with the updated values.
|
// Finally set the constant buffer in the vertex shader with the updated values.
|
||||||
deviceContext->PSSetConstantBuffers(bufferNumber, 1, &m_sunlightBuffer);
|
deviceContext->VSSetConstantBuffers(bufferNumber, 1, &m_lightPositionBuffer);
|
||||||
|
|
||||||
// Set shader texture resource in the pixel shader.
|
// Set shader texture resource in the pixel shader.
|
||||||
deviceContext->PSSetShaderResources(0, 1, &texture);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CelshadeClass::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
|
||||||
|
void LightShaderClass::RenderShader(ID3D11DeviceContext* deviceContext, int indexCount)
|
||||||
{
|
{
|
||||||
// Set the vertex input layout.
|
// Set the vertex input layout.
|
||||||
deviceContext->IASetInputLayout(m_layout);
|
deviceContext->IASetInputLayout(m_layout);
|
92
enginecustom/Lightshaderclass.h
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Filename: lightshaderclass.h
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#ifndef _LIGHTSHADERCLASS_H_
|
||||||
|
#define _LIGHTSHADERCLASS_H_
|
||||||
|
|
||||||
|
|
||||||
|
/////////////
|
||||||
|
// 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
|
@@ -6,28 +6,25 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <deque>
|
|
||||||
#include <unordered_set>
|
|
||||||
#include <imgui.h>
|
|
||||||
|
|
||||||
class Logger
|
class Logger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static Logger& Get()
|
static Logger& Get()
|
||||||
{
|
{
|
||||||
static Logger instance;
|
static Logger instance;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger(Logger const&) = delete;
|
Logger(Logger const&) = delete;
|
||||||
void operator=(Logger const&) = delete;
|
void operator=(Logger const&) = delete;
|
||||||
|
|
||||||
enum class LogLevel
|
enum class LogLevel
|
||||||
{
|
{
|
||||||
Info,
|
Info,
|
||||||
Warning,
|
Warning,
|
||||||
Error,
|
Error,
|
||||||
Shutdown,
|
Shutdown,
|
||||||
Initialize,
|
Initialize,
|
||||||
Update,
|
Update,
|
||||||
@@ -40,49 +37,8 @@ public:
|
|||||||
AI,
|
AI,
|
||||||
Resource,
|
Resource,
|
||||||
Memory,
|
Memory,
|
||||||
Debug,
|
Debug
|
||||||
Count // Do not use this, it's just to get the number of log levels it must at the end
|
};
|
||||||
};
|
|
||||||
|
|
||||||
// Return the size of the enum class LogLevel as a constant integer
|
|
||||||
static constexpr int LogLevelCount = static_cast<int>(LogLevel::Count);
|
|
||||||
|
|
||||||
struct LogEntry
|
|
||||||
{
|
|
||||||
std::string message;
|
|
||||||
LogLevel level;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct LogLevelInfo
|
|
||||||
{
|
|
||||||
const char* name;
|
|
||||||
int value;
|
|
||||||
ImVec4 color;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const LogLevelInfo GetLogLevelInfo(LogLevel level)
|
|
||||||
{
|
|
||||||
switch (level)
|
|
||||||
{
|
|
||||||
case LogLevel::Info: return LogLevelInfo{ "Info", 0, ImVec4(0.0f, 1.0f, 0.0f, 1.0f) };
|
|
||||||
case LogLevel::Warning: return LogLevelInfo{ "Warning", 1, ImVec4(1.0f, 1.0f, 0.0f, 1.0f) };
|
|
||||||
case LogLevel::Error: return LogLevelInfo{ "Error", 2, ImVec4(1.0f, 0.0f, 0.0f, 1.0f) };
|
|
||||||
case LogLevel::Shutdown: return LogLevelInfo{ "Shutdown", 3, ImVec4(0.5f, 0.0f, 0.0f, 1.0f) };
|
|
||||||
case LogLevel::Initialize: return LogLevelInfo{ "Initialize", 4, ImVec4(0.0f, 1.0f, 1.0f, 1.0f) };
|
|
||||||
case LogLevel::Update: return LogLevelInfo{ "Update", 5, ImVec4(1.0f, 0.0f, 1.0f, 1.0f) };
|
|
||||||
case LogLevel::Render: return LogLevelInfo{ "Render", 6, ImVec4(1.0f, 1.0f, 1.0f, 1.0f) };
|
|
||||||
case LogLevel::Input: return LogLevelInfo{ "Input", 7, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Physics: return LogLevelInfo{ "Physics", 8, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Audio: return LogLevelInfo{ "Audio", 9, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Network: return LogLevelInfo{ "Network", 10, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Scripting: return LogLevelInfo{ "Scripting", 11, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::AI: return LogLevelInfo{ "AI", 12, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Resource: return LogLevelInfo{ "Resource", 13, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Memory: return LogLevelInfo{ "Memory", 14, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
case LogLevel::Debug: return LogLevelInfo{ "Debug", 15, ImVec4(0.5f, 0.5f, 0.5f, 1.0f) };
|
|
||||||
default: return LogLevelInfo{ "Unknown", 16, ImVec4(1.0f, 1.0f, 1.0f, 1.0f) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Logger()
|
Logger()
|
||||||
{
|
{
|
||||||
@@ -92,7 +48,7 @@ public:
|
|||||||
if (appdata == nullptr)
|
if (appdata == nullptr)
|
||||||
{
|
{
|
||||||
m_appdataPath = "log.log";
|
m_appdataPath = "log.log";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_appdataPath = appdata;
|
m_appdataPath = appdata;
|
||||||
@@ -104,25 +60,10 @@ public:
|
|||||||
ManageLogFiles(directoryPath);
|
ManageLogFiles(directoryPath);
|
||||||
|
|
||||||
m_logFilePath = directoryPath + "\\" + m_logFileName;
|
m_logFilePath = directoryPath + "\\" + m_logFileName;
|
||||||
|
|
||||||
// Enable only the Error warning and shutdown log levels
|
|
||||||
for (int i = 0; i < LogLevelCount; i++)
|
|
||||||
{
|
|
||||||
m_disabledLogLevels[i] = true;
|
|
||||||
|
|
||||||
if (i == static_cast<int>(LogLevel::Error) || i == static_cast<int>(LogLevel::Warning) || i == static_cast<int>(LogLevel::Shutdown))
|
|
||||||
{
|
|
||||||
m_disabledLogLevels[i] = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ecrit un message dans le fichier de log et le stocke dans le buffer
|
|
||||||
void Log(const std::string& message, const std::string& fileName, int lineNumber, LogLevel level = LogLevel::Info)
|
void Log(const std::string& message, const std::string& fileName, int lineNumber, LogLevel level = LogLevel::Info)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto now = std::chrono::system_clock::now();
|
auto now = std::chrono::system_clock::now();
|
||||||
auto in_time_t = std::chrono::system_clock::to_time_t(now);
|
auto in_time_t = std::chrono::system_clock::to_time_t(now);
|
||||||
|
|
||||||
@@ -132,8 +73,59 @@ public:
|
|||||||
// Obtenez les millisecondes à partir de maintenant
|
// Obtenez les millisecondes à partir de maintenant
|
||||||
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()) % 1000;
|
auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()) % 1000;
|
||||||
|
|
||||||
// Utilisez LogLevelToString pour obtenir la chaîne de caractères du niveau de log
|
std::string levelStr;
|
||||||
std::string levelStr = GetLogLevelInfo(level).name;
|
switch (level)
|
||||||
|
{
|
||||||
|
case LogLevel::Error:
|
||||||
|
levelStr = "ERROR";
|
||||||
|
break;
|
||||||
|
case LogLevel::Warning:
|
||||||
|
levelStr = "WARNING";
|
||||||
|
break;
|
||||||
|
case LogLevel::Info:
|
||||||
|
levelStr = "INFO";
|
||||||
|
break;
|
||||||
|
case LogLevel::Shutdown:
|
||||||
|
levelStr = "SHUTDOWN";
|
||||||
|
break;
|
||||||
|
case LogLevel::Initialize:
|
||||||
|
levelStr = "INITIALIZE";
|
||||||
|
break;
|
||||||
|
case LogLevel::Update:
|
||||||
|
levelStr = "UPDATE";
|
||||||
|
break;
|
||||||
|
case LogLevel::Render:
|
||||||
|
levelStr = "RENDER";
|
||||||
|
break;
|
||||||
|
case LogLevel::Input:
|
||||||
|
levelStr = "INPUT";
|
||||||
|
break;
|
||||||
|
case LogLevel::Physics:
|
||||||
|
levelStr = "PHYSICS";
|
||||||
|
break;
|
||||||
|
case LogLevel::Audio:
|
||||||
|
levelStr = "AUDIO";
|
||||||
|
break;
|
||||||
|
case LogLevel::Network:
|
||||||
|
levelStr = "NETWORK";
|
||||||
|
break;
|
||||||
|
case LogLevel::Scripting:
|
||||||
|
levelStr = "SCRIPTING";
|
||||||
|
break;
|
||||||
|
case LogLevel::AI:
|
||||||
|
levelStr = "AI";
|
||||||
|
break;
|
||||||
|
case LogLevel::Resource:
|
||||||
|
levelStr = "RESOURCE";
|
||||||
|
break;
|
||||||
|
case LogLevel::Memory:
|
||||||
|
levelStr = "MEMORY";
|
||||||
|
break;
|
||||||
|
case LogLevel::Debug:
|
||||||
|
levelStr = "DEBUG";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "[" << std::put_time(&buf, "%Y-%m-%d") << "] "
|
ss << "[" << std::put_time(&buf, "%Y-%m-%d") << "] "
|
||||||
@@ -142,8 +134,6 @@ public:
|
|||||||
<< "[" << fileName << ":" << lineNumber << "] "
|
<< "[" << fileName << ":" << lineNumber << "] "
|
||||||
<< message;
|
<< message;
|
||||||
|
|
||||||
Log(ss.str(), level);
|
|
||||||
|
|
||||||
std::ofstream file(m_logFilePath, std::ios::app);
|
std::ofstream file(m_logFilePath, std::ios::app);
|
||||||
if (file.is_open())
|
if (file.is_open())
|
||||||
{
|
{
|
||||||
@@ -152,25 +142,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ecrit un message dans la console
|
|
||||||
void Log(const std::string& message, LogLevel level)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Si le niveau de log est désactivé, ne faites rien
|
|
||||||
if (m_disabledLogLevels[GetLogLevelInfo(level).value])
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (logBuffer.size() >= logBufferSize)
|
|
||||||
{
|
|
||||||
logBuffer.pop_front();
|
|
||||||
}
|
|
||||||
logBuffer.push_back({ message, level });
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::deque<LogEntry>& GetLogBuffer() const { return logBuffer; }
|
|
||||||
|
|
||||||
void ManageLogFiles(const std::string& directoryPath)
|
void ManageLogFiles(const std::string& directoryPath)
|
||||||
{
|
{
|
||||||
std::vector<std::filesystem::path> logFiles;
|
std::vector<std::filesystem::path> logFiles;
|
||||||
@@ -210,17 +181,12 @@ public:
|
|||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "Khaotic_log_" << std::put_time(&buf, "%Y_%m_%d_%Hh%Mm%Ss") << ".log";
|
ss << "Khaotic_log_" << std::put_time(&buf, "%Y_%m_%d_%Hh%Mm%Ss") << ".log";
|
||||||
m_logFileName = ss.str();
|
m_logFileName = ss.str();
|
||||||
}
|
|
||||||
|
|
||||||
bool m_disabledLogLevels[LogLevelCount];
|
}
|
||||||
std::string m_logFilePath;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_filename;
|
std::string m_filename;
|
||||||
std::string m_appdataPath;
|
std::string m_appdataPath;
|
||||||
std::string m_logFileName;
|
std::string m_logFileName;
|
||||||
|
std::string m_logFilePath;
|
||||||
std::deque<LogEntry> logBuffer;
|
|
||||||
const size_t logBufferSize = 100;
|
|
||||||
|
|
||||||
};
|
};
|
@@ -6,16 +6,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline,
|
|||||||
SystemClass* System;
|
SystemClass* System;
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
wchar_t path[MAX_PATH];
|
|
||||||
HMODULE hmodule = GetModuleHandle(NULL);
|
|
||||||
if (hmodule != NULL)
|
|
||||||
{
|
|
||||||
GetModuleFileName(hmodule, path, (sizeof(path) / sizeof(wchar_t)));
|
|
||||||
}
|
|
||||||
|
|
||||||
std::filesystem::path exePath(path);
|
|
||||||
std::filesystem::path WFolder = exePath.parent_path();
|
|
||||||
|
|
||||||
// Create the system object.
|
// Create the system object.
|
||||||
System = new SystemClass;
|
System = new SystemClass;
|
||||||
|
|
||||||
@@ -24,7 +14,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline,
|
|||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("System initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("System initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
System->SendPath(path,WFolder);
|
|
||||||
System->Run();
|
System->Run();
|
||||||
}
|
}
|
||||||
|
|
@@ -34,7 +34,7 @@ bool MultiTextureShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
// Set the filename of the vertex shader.
|
||||||
error = wcscpy_s(vsFilename, 128, L"src/hlsl/multitexture.vs");
|
error = wcscpy_s(vsFilename, 128, L"multitexture.vs");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to set the filename of the vertex shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
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.
|
// Set the filename of the pixel shader.
|
||||||
error = wcscpy_s(psFilename, 128, L"src/hlsl/multitexture.ps");
|
error = wcscpy_s(psFilename, 128, L"multitexture.ps");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Failed to set the filename of the pixel shader", __FILE__, __LINE__, Logger::LogLevel::Error);
|
@@ -9,28 +9,34 @@ SystemClass::SystemClass()
|
|||||||
m_Input = 0;
|
m_Input = 0;
|
||||||
m_Application = 0;
|
m_Application = 0;
|
||||||
m_imguiManager = 0;
|
m_imguiManager = 0;
|
||||||
m_applicationName = 0;
|
|
||||||
m_hinstance = 0;
|
|
||||||
m_hwnd = 0;
|
|
||||||
m_initialWindowWidth = 0;
|
|
||||||
m_initialWindowHeight = 0;
|
|
||||||
m_isDirect3DInitialized = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemClass::SystemClass(const SystemClass& other)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SystemClass::~SystemClass()
|
SystemClass::~SystemClass()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SystemClass::Initialize()
|
bool SystemClass::Initialize()
|
||||||
{
|
{
|
||||||
int screenHeight, screenWidth = 0;
|
int screenWidth, screenHeight;
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
Logger::Get().Log("Initializing system class", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
Logger::Get().Log("Initializing system class", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Initialize the width and height of the screen to zero before sending the variables into the function.
|
||||||
|
screenWidth = 0;
|
||||||
|
screenHeight = 0;
|
||||||
|
|
||||||
|
m_initialWindowWidth = 0;
|
||||||
|
m_initialWindowHeight = 0;
|
||||||
|
m_isDirect3DInitialized = false;
|
||||||
|
|
||||||
// Initialize the windows api.
|
// Initialize the windows api.
|
||||||
InitializeWindows(screenWidth, screenHeight);
|
InitializeWindows(screenWidth, screenHeight);
|
||||||
|
|
||||||
@@ -143,7 +149,6 @@ void SystemClass::Run()
|
|||||||
|
|
||||||
// Loop until there is a quit message from the window or the user.
|
// Loop until there is a quit message from the window or the user.
|
||||||
done = false;
|
done = false;
|
||||||
|
|
||||||
while (!done)
|
while (!done)
|
||||||
{
|
{
|
||||||
// Handle the windows messages.
|
// Handle the windows messages.
|
||||||
@@ -252,8 +257,6 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
|
|||||||
// If Direct3D is initialized, update the swap chain. Otherwise, store the window dimensions
|
// If Direct3D is initialized, update the swap chain. Otherwise, store the window dimensions
|
||||||
if (m_isDirect3DInitialized && m_Application && m_Application->GetDirect3D())
|
if (m_isDirect3DInitialized && m_Application && m_Application->GetDirect3D())
|
||||||
{
|
{
|
||||||
m_Application->SetScreenWidth(newWidth);
|
|
||||||
m_Application->SetScreenHeight(newHeight);
|
|
||||||
m_Application->GetDirect3D()->ResizeSwapChain(newWidth, newHeight);
|
m_Application->GetDirect3D()->ResizeSwapChain(newWidth, newHeight);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -261,7 +264,6 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
|
|||||||
m_initialWindowWidth = newWidth;
|
m_initialWindowWidth = newWidth;
|
||||||
m_initialWindowHeight = newHeight;
|
m_initialWindowHeight = newHeight;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
case WM_ENTERSIZEMOVE:
|
case WM_ENTERSIZEMOVE:
|
||||||
{
|
{
|
||||||
@@ -461,10 +463,3 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT umessage, WPARAM wparam, LPARAM lparam)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemClass::SendPath(wchar_t* path, std::filesystem::path WFolder)
|
|
||||||
{
|
|
||||||
m_Application->SetPath(path);
|
|
||||||
m_Application->SetWFolder(WFolder);
|
|
||||||
}
|
|
||||||
|
|
BIN
enginecustom/alpha01.tga
Normal file
After Width: | Height: | Size: 1.0 MiB |
@@ -31,7 +31,7 @@ bool AlphaMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
// Set the filename of the vertex shader.
|
// Set the filename of the vertex shader.
|
||||||
error = wcscpy_s(vsFilename, 128, L"src/hlsl/alphamap.vs");
|
error = wcscpy_s(vsFilename, 128, L"alphamap.vs");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Error copying string ", __FILE__, __LINE__, Logger::LogLevel::Error);
|
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.
|
// Set the filename of the pixel shader.
|
||||||
error = wcscpy_s(psFilename, 128, L"src/hlsl/alphamap.ps");
|
error = wcscpy_s(psFilename, 128, L"alphamap.ps");
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
{
|
{
|
||||||
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
Logger::Get().Log("Error copying string", __FILE__, __LINE__, Logger::LogLevel::Error);
|
@@ -29,31 +29,16 @@
|
|||||||
#include "translateshaderclass.h"
|
#include "translateshaderclass.h"
|
||||||
#include "reflectionshaderclass.h"
|
#include "reflectionshaderclass.h"
|
||||||
#include "physics.h"
|
#include "physics.h"
|
||||||
#include "frustum.h"
|
|
||||||
|
|
||||||
#include <WICTextureLoader.h>
|
|
||||||
#include <comdef.h> // Pour _com_error
|
|
||||||
#include <chrono>
|
|
||||||
#include <thread>
|
|
||||||
#include <map>
|
|
||||||
#include <algorithm>
|
|
||||||
#include <DirectXMath.h>
|
|
||||||
|
|
||||||
|
|
||||||
/////////////
|
/////////////
|
||||||
// GLOBALS //
|
// GLOBALS //
|
||||||
/////////////
|
/////////////
|
||||||
const bool FULL_SCREEN = false;
|
const bool FULL_SCREEN = false;
|
||||||
|
const bool VSYNC_ENABLED = true;
|
||||||
const float SCREEN_DEPTH = 1000.0f;
|
const float SCREEN_DEPTH = 1000.0f;
|
||||||
const float SCREEN_NEAR = 0.3f;
|
const float SCREEN_NEAR = 0.3f;
|
||||||
|
|
||||||
struct Input
|
|
||||||
{
|
|
||||||
bool m_KeyLeft = false;
|
|
||||||
bool m_KeyRight = false;
|
|
||||||
bool m_KeyUp = false;
|
|
||||||
bool m_KeyDown = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Class name: ApplicationClass
|
// Class name: ApplicationClass
|
||||||
@@ -62,25 +47,16 @@ class ApplicationClass
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ApplicationClass();
|
ApplicationClass();
|
||||||
|
ApplicationClass(const ApplicationClass&);
|
||||||
~ApplicationClass();
|
~ApplicationClass();
|
||||||
D3DClass* GetDirect3D();
|
D3DClass* GetDirect3D();
|
||||||
RenderTextureClass* GetSceneTexture() const { return m_SceneTexture; };
|
|
||||||
RenderTextureClass* GetRenderTexture() const { return m_RenderTexture; };
|
|
||||||
RenderTextureClass* GetRefractionTexture() const { return m_RefractionTexture; };
|
|
||||||
RenderTextureClass* GetReflectionTexture() const { return m_ReflectionTexture; };
|
|
||||||
|
|
||||||
|
|
||||||
bool Initialize(int, int, HWND);
|
bool Initialize(int, int, HWND);
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
bool Frame(InputClass*);
|
bool Frame(InputClass*);
|
||||||
void PhysicsThreadFunction();
|
|
||||||
int GetPhysicsTickRate() const { return m_PhysicsTickRate; };
|
|
||||||
void SetPhysicsTickRate(int physicsTickRate) { m_PhysicsTickRate = physicsTickRate; };
|
|
||||||
|
|
||||||
int GetScreenWidth() const;
|
int GetScreenWidth() const;
|
||||||
void SetScreenWidth(int screenWidth);
|
|
||||||
int GetScreenHeight() const;
|
int GetScreenHeight() const;
|
||||||
void SetScreenHeight(int screenHeight);
|
|
||||||
|
|
||||||
float GetSpeed() const { return m_speed; };
|
float GetSpeed() const { return m_speed; };
|
||||||
void SetSpeed(float speed) { this->m_speed = speed; };
|
void SetSpeed(float speed) { this->m_speed = speed; };
|
||||||
@@ -93,8 +69,6 @@ public:
|
|||||||
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
std::vector<Object*> GetTerrainCubes() const { return m_terrainChunk; };
|
||||||
std::vector<Object*> GetKobjects() const { return m_object; };
|
std::vector<Object*> GetKobjects() const { return m_object; };
|
||||||
void AddKobject(WCHAR* filepath);
|
void AddKobject(WCHAR* filepath);
|
||||||
void SetPath(WCHAR* path) { m_path = path; };
|
|
||||||
void SetWFolder(std::filesystem::path WFolder) { m_WFolder = WFolder; };
|
|
||||||
|
|
||||||
void GenerateTerrain();
|
void GenerateTerrain();
|
||||||
void DeleteTerrain();
|
void DeleteTerrain();
|
||||||
@@ -106,64 +80,21 @@ public:
|
|||||||
void DeleteLight(int index);
|
void DeleteLight(int index);
|
||||||
void AddLight();
|
void AddLight();
|
||||||
std::vector<LightClass*> GetLights() const { return m_Lights; };
|
std::vector<LightClass*> GetLights() const { return m_Lights; };
|
||||||
LightClass* GetSunLight() const { return m_SunLight; };
|
|
||||||
|
|
||||||
bool GetShouldQuit() const { return m_ShouldQuit; };
|
bool GetShouldQuit() const { return m_ShouldQuit; };
|
||||||
void SetShouldQuit(bool shouldQuit) { m_ShouldQuit = shouldQuit; };
|
void SetShouldQuit(bool shouldQuit) { m_ShouldQuit = shouldQuit; };
|
||||||
|
|
||||||
void SetCelShading(bool enable) { m_enableCelShading = enable; };
|
void SetCelShading(bool enable) { m_enableCelShading = enable; };
|
||||||
|
|
||||||
void SetVsync(bool vsync);
|
|
||||||
bool GetVsync() const { return VSYNC_ENABLED; };
|
|
||||||
|
|
||||||
HWND GetHwnd() const;
|
|
||||||
void SetHwnd(HWND hwnd);
|
|
||||||
|
|
||||||
bool IsWindowed() const;
|
|
||||||
void SetWindowed(bool windowed);
|
|
||||||
|
|
||||||
void SetWindowSize(ImVec2 size) { windowSize = size; };
|
|
||||||
ImVec2 GetWindowSize() const { return windowSize; };
|
|
||||||
float GetAspectRatio() const { return (float)m_screenWidth / (float)m_screenHeight; };
|
|
||||||
|
|
||||||
Physics* GetPhysics() const { return m_Physics; };
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
|
||||||
// ------------- Culling ------------- //
|
|
||||||
// ----------------------------------- //
|
|
||||||
|
|
||||||
Frustum GetFrustum() const { return m_FrustumCulling; };
|
|
||||||
void SetFrustum(Frustum frustum) { m_FrustumCulling = frustum; };
|
|
||||||
|
|
||||||
void ConstructFrustum();
|
|
||||||
int GetRenderCount() const { return m_renderCount; };
|
|
||||||
void SetRenderCount(int renderCount) { m_renderCount = renderCount; };
|
|
||||||
float GetFrustumTolerance() const { return m_FrustumCullingTolerance; };
|
|
||||||
void SetFrustumTolerance(float frustumTolerance) { m_FrustumCullingTolerance = frustumTolerance; };
|
|
||||||
|
|
||||||
bool GetCanFixedUpdate() const { return CanFixedUpdate; };
|
|
||||||
void SetCanFixedUpdate(bool canFixedUpdate) { CanFixedUpdate = canFixedUpdate; };
|
|
||||||
|
|
||||||
ID3D11ShaderResourceView* GetBackBufferSRV() const {return m_BackBufferSRV;};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool Render(float, float, float, float, float);
|
bool Render(float, float, float, float, float);
|
||||||
bool RenderPhysics(bool keyLeft, bool keyRight, bool keyUp, bool keyDown, float deltaTime);
|
|
||||||
bool UpdateMouseStrings(int, int, bool);
|
bool UpdateMouseStrings(int, int, bool);
|
||||||
bool UpdateFps();
|
bool UpdateFps();
|
||||||
bool UpdateRenderCountString(int);
|
bool UpdateRenderCountString(int);
|
||||||
bool RenderSceneToTexture(float);
|
bool RenderSceneToTexture(float);
|
||||||
bool RenderRefractionToTexture();
|
bool RenderRefractionToTexture();
|
||||||
bool RenderReflectionToTexture();
|
bool RenderReflectionToTexture();
|
||||||
bool RenderPass(const std::vector<std::reference_wrapper<std::vector<Object*>>>& RenderQueues, XMFLOAT4* diffuse, XMFLOAT4* position, XMFLOAT4* ambient, XMMATRIX view, XMMATRIX projection);
|
|
||||||
|
|
||||||
void ConstructSkybox(); // Construct the skybox
|
ID3D11ShaderResourceView* LoadTexture(const std::string* filename);
|
||||||
void UpdateSkyboxPosition(); // Update the skybox position
|
|
||||||
bool RenderSkybox(XMMATRIX view, XMMATRIX projection); // Render the skybox
|
|
||||||
|
|
||||||
public :
|
|
||||||
std::vector<ID3D11ShaderResourceView*> textures;
|
|
||||||
std::vector<ID3D11ShaderResourceView*> m_SkyboxTextures;
|
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
@@ -175,10 +106,6 @@ private :
|
|||||||
IDXGISwapChain* m_swapChain;
|
IDXGISwapChain* m_swapChain;
|
||||||
ModelClass* m_Model,* m_GroundModel, * m_WallModel, * m_BathModel, * m_WaterModel;
|
ModelClass* m_Model,* m_GroundModel, * m_WallModel, * m_BathModel, * m_WaterModel;
|
||||||
ModelListClass* m_ModelList;
|
ModelListClass* m_ModelList;
|
||||||
bool VSYNC_ENABLED = true;
|
|
||||||
|
|
||||||
HWND m_hwnd;
|
|
||||||
bool m_windowed;
|
|
||||||
|
|
||||||
// ------------------------------------- //
|
// ------------------------------------- //
|
||||||
// ------------- RENDERING ------------- //
|
// ------------- RENDERING ------------- //
|
||||||
@@ -186,12 +113,11 @@ private :
|
|||||||
|
|
||||||
XMMATRIX m_baseViewMatrix;
|
XMMATRIX m_baseViewMatrix;
|
||||||
RenderTextureClass* m_RenderTexture, * m_RefractionTexture, * m_ReflectionTexture;
|
RenderTextureClass* m_RenderTexture, * m_RefractionTexture, * m_ReflectionTexture;
|
||||||
RenderTextureClass* m_SceneTexture;
|
|
||||||
DisplayPlaneClass* m_DisplayPlane;
|
DisplayPlaneClass* m_DisplayPlane;
|
||||||
int m_screenWidth, m_screenHeight;
|
int m_screenWidth, m_screenHeight;
|
||||||
CameraClass* m_Camera;
|
CameraClass* m_Camera;
|
||||||
PositionClass* m_Position;
|
PositionClass* m_Position;
|
||||||
std::vector<XMMATRIX> m_SkyboxInitialTranslations;
|
FrustumClass* m_Frustum;
|
||||||
|
|
||||||
// ------------------------------------ //
|
// ------------------------------------ //
|
||||||
// ------------- OBJECTS -------------- //
|
// ------------- OBJECTS -------------- //
|
||||||
@@ -203,8 +129,6 @@ private :
|
|||||||
float m_speed = 0.1f; // speed for the demo spinning object
|
float m_speed = 0.1f; // speed for the demo spinning object
|
||||||
std::vector<Object*> m_object;
|
std::vector<Object*> m_object;
|
||||||
int m_ObjectId = 0;
|
int m_ObjectId = 0;
|
||||||
std::vector<std::reference_wrapper<std::vector<Object*>>> m_RenderQueues;
|
|
||||||
std::vector<Object*> m_Skybox;
|
|
||||||
|
|
||||||
// ----------------------------------- //
|
// ----------------------------------- //
|
||||||
// ------------- LIGHTS -------------- //
|
// ------------- LIGHTS -------------- //
|
||||||
@@ -213,7 +137,6 @@ private :
|
|||||||
LightClass* m_Light;
|
LightClass* m_Light;
|
||||||
std::vector<LightClass*> m_Lights;
|
std::vector<LightClass*> m_Lights;
|
||||||
int m_numLights;
|
int m_numLights;
|
||||||
LightClass* m_SunLight;
|
|
||||||
|
|
||||||
XMFLOAT3 TrueLightPosition;
|
XMFLOAT3 TrueLightPosition;
|
||||||
ModelClass* m_LightModel;
|
ModelClass* m_LightModel;
|
||||||
@@ -234,8 +157,6 @@ private :
|
|||||||
// ----------------------------------- //
|
// ----------------------------------- //
|
||||||
|
|
||||||
float m_waterHeight, m_waterTranslation;
|
float m_waterHeight, m_waterTranslation;
|
||||||
wchar_t* m_path;
|
|
||||||
std::filesystem::path m_WFolder;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
// ------------------------------------------------- //
|
||||||
// ------------- FPS AND INFO ON SCREEN ------------ //
|
// ------------- FPS AND INFO ON SCREEN ------------ //
|
||||||
@@ -257,27 +178,6 @@ private :
|
|||||||
Physics* m_Physics;
|
Physics* m_Physics;
|
||||||
float m_gravity;
|
float m_gravity;
|
||||||
XMVECTOR m_previousPosition;
|
XMVECTOR m_previousPosition;
|
||||||
ImVec2 windowSize;
|
|
||||||
int m_PhysicsTickRate = 50;
|
|
||||||
bool CanFixedUpdate = false;
|
|
||||||
std::thread m_PhysicsThread;
|
|
||||||
|
|
||||||
ID3D11Texture2D* m_BackBufferTexture;
|
|
||||||
ID3D11ShaderResourceView* m_BackBufferSRV;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
// ------------------- Culling --------------------- //
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
|
|
||||||
Frustum m_FrustumCulling;
|
|
||||||
int m_renderCount;
|
|
||||||
float m_FrustumCullingTolerance = 5.f;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
// -------------------- Input ---------------------- //
|
|
||||||
// ------------------------------------------------- //
|
|
||||||
|
|
||||||
Input m_Inputs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
@@ -1,16 +0,0 @@
|
|||||||
# Simple 2D plane in OBJ format
|
|
||||||
|
|
||||||
v -0.5 0.0 -0.5
|
|
||||||
v 0.5 0.0 -0.5
|
|
||||||
v -0.5 0.0 0.5
|
|
||||||
v 0.5 0.0 0.5
|
|
||||||
|
|
||||||
vt 0.0 0.0
|
|
||||||
vt 1.0 0.0
|
|
||||||
vt 0.0 1.0
|
|
||||||
vt 1.0 1.0
|
|
||||||
|
|
||||||
vn 0.0 1.0 0.0
|
|
||||||
|
|
||||||
f 1/1/1 4/4/1 2/2/1
|
|
||||||
f 1/1/1 3/3/1 4/4/1
|
|
@@ -1,24 +0,0 @@
|
|||||||
[Window][Debug##Default]
|
|
||||||
Pos=60,60
|
|
||||||
Size=400,400
|
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
|
||||||
Pos=1120,51
|
|
||||||
Size=392,273
|
|
||||||
|
|
||||||
[Window][Objects]
|
|
||||||
Pos=930,39
|
|
||||||
Size=457,294
|
|
||||||
|
|
||||||
[Window][Terrain]
|
|
||||||
Pos=60,60
|
|
||||||
Size=342,82
|
|
||||||
|
|
||||||
[Window][Light]
|
|
||||||
Pos=1551,17
|
|
||||||
Size=358,535
|
|
||||||
|
|
||||||
[Window][Shader Manager]
|
|
||||||
Pos=30,255
|
|
||||||
Size=172,284
|
|
||||||
|
|
@@ -1,91 +0,0 @@
|
|||||||
[Window][Debug##Default]
|
|
||||||
Pos=60,60
|
|
||||||
Size=400,400
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
|
||||||
Pos=1180,27
|
|
||||||
Size=396,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000005,0
|
|
||||||
|
|
||||||
[Window][Objects]
|
|
||||||
Pos=8,442
|
|
||||||
Size=290,411
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000A,0
|
|
||||||
|
|
||||||
[Window][Terrain]
|
|
||||||
Pos=8,27
|
|
||||||
Size=290,413
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000009,0
|
|
||||||
|
|
||||||
[Window][Light]
|
|
||||||
Pos=8,27
|
|
||||||
Size=330,487
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000004,1
|
|
||||||
|
|
||||||
[Window][Shader Manager]
|
|
||||||
Pos=8,27
|
|
||||||
Size=330,487
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000004,2
|
|
||||||
|
|
||||||
[Window][Engine Settings]
|
|
||||||
Pos=1180,27
|
|
||||||
Size=396,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000005,1
|
|
||||||
|
|
||||||
[Window][DockSpace Demo]
|
|
||||||
Size=1584,861
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Render Window]
|
|
||||||
Pos=300,27
|
|
||||||
Size=878,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000002,0
|
|
||||||
|
|
||||||
[Window][DockSpace]
|
|
||||||
Pos=0,0
|
|
||||||
Size=1584,861
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Add Object]
|
|
||||||
Pos=1188,0
|
|
||||||
Size=396,430
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Log]
|
|
||||||
Pos=8,518
|
|
||||||
Size=1568,335
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000C,0
|
|
||||||
|
|
||||||
[Window][Log Window]
|
|
||||||
Pos=8,627
|
|
||||||
Size=1568,226
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000E,0
|
|
||||||
|
|
||||||
[Docking][Data]
|
|
||||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
|
||||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Split=Y Selected=0x393905AB
|
|
||||||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=330,487 Selected=0x393905AB
|
|
||||||
DockNode ID=0x00000006 Parent=0x00000001 SizeRef=330,485 Selected=0x031DC75C
|
|
||||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
|
||||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
|
||||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1568,598 Split=Y
|
|
||||||
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1568,637 Split=X
|
|
||||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=290,826 Split=Y Selected=0x393905AB
|
|
||||||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=395,413 Selected=0x393905AB
|
|
||||||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=395,411 Selected=0x031DC75C
|
|
||||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1276,826 Split=X
|
|
||||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=878,826 CentralNode=1 Selected=0x9204953B
|
|
||||||
DockNode ID=0x00000005 Parent=0x00000008 SizeRef=396,826 Selected=0x9F035453
|
|
||||||
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1568,335 Selected=0x139FDA3F
|
|
||||||
DockNode ID=0x0000000E Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
|
||||||
|
|
Before Width: | Height: | Size: 331 KiB |
Before Width: | Height: | Size: 273 KiB |
Before Width: | Height: | Size: 493 KiB |
Before Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 498 KiB |
Before Width: | Height: | Size: 422 KiB |
Before Width: | Height: | Size: 7.5 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 8.4 MiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 588 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.6 MiB |
@@ -1,89 +0,0 @@
|
|||||||
[Window][Debug##Default]
|
|
||||||
Pos=60,60
|
|
||||||
Size=400,400
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Khaotic Engine]
|
|
||||||
Pos=1180,27
|
|
||||||
Size=396,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000005,0
|
|
||||||
|
|
||||||
[Window][Objects]
|
|
||||||
Pos=8,27
|
|
||||||
Size=290,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000A,0
|
|
||||||
|
|
||||||
[Window][Terrain]
|
|
||||||
Pos=8,27
|
|
||||||
Size=290,487
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000009,0
|
|
||||||
|
|
||||||
[Window][Light]
|
|
||||||
Pos=8,27
|
|
||||||
Size=290,487
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000009,1
|
|
||||||
|
|
||||||
[Window][Shader Manager]
|
|
||||||
Pos=8,27
|
|
||||||
Size=330,487
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000001,2
|
|
||||||
|
|
||||||
[Window][Engine Settings]
|
|
||||||
Pos=1516,27
|
|
||||||
Size=396,974
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000005,1
|
|
||||||
|
|
||||||
[Window][DockSpace Demo]
|
|
||||||
Size=1584,861
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Render Window]
|
|
||||||
Pos=300,27
|
|
||||||
Size=878,826
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x00000002,0
|
|
||||||
|
|
||||||
[Window][DockSpace]
|
|
||||||
Pos=0,0
|
|
||||||
Size=1584,861
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Add Object]
|
|
||||||
Pos=1188,0
|
|
||||||
Size=396,430
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Log]
|
|
||||||
Pos=8,518
|
|
||||||
Size=1568,335
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000C,0
|
|
||||||
|
|
||||||
[Window][Log Window]
|
|
||||||
Pos=8,775
|
|
||||||
Size=1904,226
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0x0000000E,0
|
|
||||||
|
|
||||||
[Docking][Data]
|
|
||||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
|
||||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
|
||||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
|
||||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
|
||||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1568,598 Split=Y
|
|
||||||
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1568,637 Split=X
|
|
||||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=290,826 Split=Y Selected=0x393905AB
|
|
||||||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=395,413 Selected=0x393905AB
|
|
||||||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=395,411 Selected=0x031DC75C
|
|
||||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=1276,826 Split=X
|
|
||||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=878,826 CentralNode=1 Selected=0x9204953B
|
|
||||||
DockNode ID=0x00000005 Parent=0x00000008 SizeRef=396,826 Selected=0x9F035453
|
|
||||||
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1568,335 Selected=0x139FDA3F
|
|
||||||
DockNode ID=0x0000000E Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
|
||||||
|
|
Before Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 2.9 MiB |
Before Width: | Height: | Size: 599 KiB |
Before Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 917 KiB |
Before Width: | Height: | Size: 934 KiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 161 KiB |
89
enginecustom/celshading.ps
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
cbuffer LightBuffer
|
||||||
|
{
|
||||||
|
float4 diffuseColor;
|
||||||
|
float3 lightDirection;
|
||||||
|
float padding; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
float3 lightPosition; // Add light position
|
||||||
|
float padding2; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
float constantAttenuation;
|
||||||
|
float linearAttenuation;
|
||||||
|
float quadraticAttenuation;
|
||||||
|
float padding3; // Padding to ensure the structure is a multiple of 16 bytes.
|
||||||
|
};
|
||||||
|
|
||||||
|
Texture2D shaderTexture;
|
||||||
|
SamplerState SampleType;
|
||||||
|
|
||||||
|
struct PixelInputType
|
||||||
|
{
|
||||||
|
float4 position : SV_POSITION;
|
||||||
|
float3 normal : NORMAL;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float3 worldPos : TEXCOORD1; // Add world position
|
||||||
|
};
|
||||||
|
|
||||||
|
float4 CelShadingPixelShader(PixelInputType input) : SV_TARGET
|
||||||
|
{
|
||||||
|
float4 textureColor;
|
||||||
|
float lightIntensity;
|
||||||
|
float4 finalColor;
|
||||||
|
|
||||||
|
// Sample the pixel color from the texture.
|
||||||
|
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||||
|
|
||||||
|
float3 normal = normalize(input.normal);
|
||||||
|
|
||||||
|
// Calculate the light vector from the light position to the world position
|
||||||
|
float3 lightVector = normalize(lightPosition - input.worldPos);
|
||||||
|
|
||||||
|
// Calculate the light intensity based on the light direction.
|
||||||
|
float directionalLightIntensity = saturate(dot(normal, normalize(lightDirection)));
|
||||||
|
|
||||||
|
// Calculate the light intensity based on the light position.
|
||||||
|
float positionalLightIntensity = saturate(dot(normal, lightVector));
|
||||||
|
|
||||||
|
// Combine the directional and positional light intensities.
|
||||||
|
lightIntensity = max(directionalLightIntensity, positionalLightIntensity);
|
||||||
|
|
||||||
|
// Calculate the distance from the light to the fragment.
|
||||||
|
float distance = length(lightPosition - input.worldPos);
|
||||||
|
|
||||||
|
// Apply an attenuation factor based on the distance.
|
||||||
|
float attenuation = 1.0f / (constantAttenuation + linearAttenuation * distance + quadraticAttenuation * distance * distance);
|
||||||
|
|
||||||
|
// Combine the light intensity with the attenuation factor.
|
||||||
|
lightIntensity *= attenuation;
|
||||||
|
|
||||||
|
// Apply a step function to create the cel shading effect.
|
||||||
|
if (lightIntensity > 0.75f)
|
||||||
|
{
|
||||||
|
lightIntensity = 1.0f; // Brightest level
|
||||||
|
}
|
||||||
|
else if (lightIntensity > 0.5f)
|
||||||
|
{
|
||||||
|
lightIntensity = 0.7f; // Mid-bright level
|
||||||
|
}
|
||||||
|
else if (lightIntensity > 0.25f)
|
||||||
|
{
|
||||||
|
lightIntensity = 0.4f; // Mid-dark level
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lightIntensity = 0.1f; // Darkest level
|
||||||
|
}
|
||||||
|
|
||||||
|
// Simple shadow calculation: if the fragment is behind the light source, it is in shadow.
|
||||||
|
float3 toLight = normalize(lightPosition - input.worldPos);
|
||||||
|
float shadow = saturate(dot(normal, toLight));
|
||||||
|
if (shadow < 0.1f)
|
||||||
|
{
|
||||||
|
lightIntensity *= 0.5f; // Darken the fragment if it is in shadow
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate the final color by combining the texture color with the light intensity and diffuse color.
|
||||||
|
finalColor = textureColor * diffuseColor * lightIntensity;
|
||||||
|
|
||||||
|
//return finalColor;
|
||||||
|
|
||||||
|
return float4(normal * 0.5f + 0.5f, 1.0f);
|
||||||
|
}
|
45
enginecustom/celshading.vs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
cbuffer MatrixBuffer
|
||||||
|
{
|
||||||
|
matrix worldMatrix;
|
||||||
|
matrix viewMatrix;
|
||||||
|
matrix projectionMatrix;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct VertexInputType
|
||||||
|
{
|
||||||
|
float4 position : POSITION;
|
||||||
|
float3 normal : NORMAL;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PixelInputType
|
||||||
|
{
|
||||||
|
float4 position : SV_POSITION;
|
||||||
|
float3 normal : NORMAL;
|
||||||
|
float2 tex : TEXCOORD0;
|
||||||
|
float3 worldPos : TEXCOORD1; // Add world position
|
||||||
|
};
|
||||||
|
|
||||||
|
PixelInputType CelShadingVertexShader(VertexInputType input)
|
||||||
|
{
|
||||||
|
PixelInputType output;
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
float4 worldPosition = mul(input.position, worldMatrix);
|
||||||
|
output.position = mul(worldPosition, viewMatrix);
|
||||||
|
output.position = mul(output.position, projectionMatrix);
|
||||||
|
|
||||||
|
// Pass the normal to the pixel shader
|
||||||
|
output.normal = normalize(mul((float3x3) worldMatrix, input.normal));
|
||||||
|
|
||||||
|
// Pass the world position to the pixel shader
|
||||||
|
output.worldPos = worldPosition.xyz;
|
||||||
|
|
||||||
|
// Store the texture coordinates for the pixel shader.
|
||||||
|
output.tex = input.tex;
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
@@ -405,7 +405,7 @@ bool D3DClass::Initialize(int screenWidth, int screenHeight, bool vsync, HWND hw
|
|||||||
blendStateDescription.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
|
blendStateDescription.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
|
||||||
blendStateDescription.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
|
blendStateDescription.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
|
||||||
blendStateDescription.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
blendStateDescription.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
|
||||||
blendStateDescription.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
|
blendStateDescription.RenderTarget[0].RenderTargetWriteMask = 0x0f;
|
||||||
|
|
||||||
// Create the blend state using the description.
|
// Create the blend state using the description.
|
||||||
result = m_device->CreateBlendState(&blendStateDescription, &m_alphaEnableBlendingState);
|
result = m_device->CreateBlendState(&blendStateDescription, &m_alphaEnableBlendingState);
|
||||||
@@ -565,6 +565,28 @@ ID3D11DeviceContext* D3DClass::GetDeviceContext()
|
|||||||
return m_deviceContext;
|
return m_deviceContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XMMATRIX D3DClass::GetProjectionMatrix(XMMATRIX& projectionMatrix)
|
||||||
|
{
|
||||||
|
projectionMatrix = m_projectionMatrix;
|
||||||
|
return m_projectionMatrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void D3DClass::GetWorldMatrix(XMMATRIX& worldMatrix)
|
||||||
|
{
|
||||||
|
worldMatrix = m_worldMatrix;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void D3DClass::GetOrthoMatrix(XMMATRIX& orthoMatrix)
|
||||||
|
{
|
||||||
|
orthoMatrix = m_orthoMatrix;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void D3DClass::GetVideoCardInfo(char* cardName, int& memory)
|
void D3DClass::GetVideoCardInfo(char* cardName, int& memory)
|
||||||
{
|
{
|
||||||
strcpy_s(cardName, 128, m_videoCardDescription);
|
strcpy_s(cardName, 128, m_videoCardDescription);
|
||||||
@@ -695,8 +717,7 @@ IDXGISwapChain* D3DClass::GetSwapChain()
|
|||||||
void D3DClass::ResizeSwapChain(int newWidth, int newHeight)
|
void D3DClass::ResizeSwapChain(int newWidth, int newHeight)
|
||||||
{
|
{
|
||||||
|
|
||||||
// log the new width and height
|
Logger::Get().Log("Resizing swap chain", __FILE__, __LINE__);
|
||||||
Logger::Get().Log("Resizing swap chain to " + std::to_string(newWidth) + "x" + std::to_string(newHeight), __FILE__, __LINE__);
|
|
||||||
|
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
|
|
||||||
@@ -767,8 +788,3 @@ void D3DClass::DisableAlphaBlending()
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D3DClass::SetVsync(bool vsync)
|
|
||||||
{
|
|
||||||
m_vsync_enabled = vsync;
|
|
||||||
}
|
|
@@ -42,16 +42,14 @@ public:
|
|||||||
|
|
||||||
ID3D11Device* GetDevice();
|
ID3D11Device* GetDevice();
|
||||||
ID3D11DeviceContext* GetDeviceContext();
|
ID3D11DeviceContext* GetDeviceContext();
|
||||||
//XMMATRIX GetProjectionMatrix(XMMATRIX& projectionMatrix);
|
XMMATRIX GetProjectionMatrix(XMMATRIX& projectionMatrix);
|
||||||
IDXGISwapChain* m_swapChain;
|
IDXGISwapChain* m_swapChain;
|
||||||
IDXGISwapChain* GetSwapChain();
|
IDXGISwapChain* GetSwapChain();
|
||||||
void ResizeSwapChain(int, int);
|
void ResizeSwapChain(int, int);
|
||||||
void SetVsync(bool vsync);
|
|
||||||
|
|
||||||
|
XMMATRIX GetProjectionMatrix();
|
||||||
XMMATRIX GetProjectionMatrix() const { return m_projectionMatrix; };
|
void GetWorldMatrix(XMMATRIX&);
|
||||||
XMMATRIX GetWorldMatrix() const { return m_worldMatrix;};
|
void GetOrthoMatrix(XMMATRIX&);
|
||||||
XMMATRIX GetOrthoMatrix() const { return m_orthoMatrix; };
|
|
||||||
|
|
||||||
void GetVideoCardInfo(char*, int&);
|
void GetVideoCardInfo(char*, int&);
|
||||||
|
|
BIN
enginecustom/dirt01.tga
Normal file
After Width: | Height: | Size: 1.0 MiB |
@@ -19,60 +19,62 @@
|
|||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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="imguiManager.cpp" />
|
||||||
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
|
<ClCompile Include="include\backends\imgui_impl_dx11.cpp" />
|
||||||
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
|
<ClCompile Include="include\backends\imgui_impl_win32.cpp" />
|
||||||
<ClCompile Include="include\imgui.cpp" />
|
<ClCompile Include="include\imgui.cpp" />
|
||||||
|
<ClCompile Include="include\imgui_demo.cpp" />
|
||||||
<ClCompile Include="include\imgui_draw.cpp" />
|
<ClCompile Include="include\imgui_draw.cpp" />
|
||||||
<ClCompile Include="include\imgui_tables.cpp" />
|
<ClCompile Include="include\imgui_tables.cpp" />
|
||||||
<ClCompile Include="include\imgui_widgets.cpp" />
|
<ClCompile Include="include\imgui_widgets.cpp" />
|
||||||
<ClCompile Include="include\Src\DDSTextureLoader.cpp" />
|
<ClCompile Include="displayplaneclass.cpp" />
|
||||||
<ClCompile Include="include\Src\DirectXHelpers.cpp" />
|
<ClCompile Include="fontclass.cpp" />
|
||||||
<ClCompile Include="include\Src\pch.cpp" />
|
<ClCompile Include="fontshaderclass.cpp" />
|
||||||
<ClCompile Include="include\Src\SimpleMath.cpp" />
|
<ClCompile Include="fpsclass.cpp" />
|
||||||
<ClCompile Include="include\Src\WICTextureLoader.cpp" />
|
<ClCompile Include="frustumclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp" />
|
<ClCompile Include="inputclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\CelShadingShader.cpp" />
|
<ClCompile Include="Lightclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\Colorshaderclass.cpp" />
|
<ClCompile Include="lightmapshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\fontshaderclass.cpp" />
|
<ClCompile Include="Lightshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp" />
|
<ClCompile Include="Main.cpp" />
|
||||||
<ClCompile Include="src\src\shader\lightshaderclass.cpp" />
|
<ClCompile Include="modelclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp" />
|
<ClCompile Include="object.cpp" />
|
||||||
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp" />
|
<ClCompile Include="modellistclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp" />
|
<ClCompile Include="Multitextureshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\refractionshaderclass.cpp" />
|
<ClCompile Include="normalmapshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\shadermanagerclass.cpp" />
|
<ClCompile Include="refractionshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\specmapshaderclass.cpp" />
|
<ClCompile Include="shadermanagerclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp" />
|
<ClCompile Include="physics.cpp" />
|
||||||
<ClCompile Include="src\src\shader\textureshaderclass.cpp" />
|
<ClCompile Include="positionclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\translateshaderclass.cpp" />
|
<ClCompile Include="reflectionshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\transparentshaderclass.cpp" />
|
<ClCompile Include="rendertextureclass.cpp" />
|
||||||
<ClCompile Include="src\src\shader\watershaderclass.cpp" />
|
<ClCompile Include="specmapshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\applicationclass.cpp" />
|
<ClCompile Include="Spriteclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\bitmapclass.cpp" />
|
<ClCompile Include="Systemclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\Cameraclass.cpp" />
|
<ClCompile Include="textclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\d3dclass.cpp" />
|
<ClCompile Include="textureclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\displayplaneclass.cpp" />
|
<ClCompile Include="textureshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\fontclass.cpp" />
|
<ClCompile Include="Timerclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\fpsclass.cpp" />
|
<ClCompile Include="translateshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\frustum.cpp" />
|
<ClCompile Include="transparentshaderclass.cpp" />
|
||||||
<ClCompile Include="src\src\system\frustumclass.cpp" />
|
<ClCompile Include="watershaderclass.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>
|
||||||
<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="imguiManager.h" />
|
||||||
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
|
<ClInclude Include="include\backends\imgui_impl_dx11.h" />
|
||||||
<ClInclude Include="include\backends\imgui_impl_win32.h" />
|
<ClInclude Include="include\backends\imgui_impl_win32.h" />
|
||||||
<ClInclude Include="include\imconfig.h" />
|
<ClInclude Include="include\imconfig.h" />
|
||||||
@@ -81,378 +83,196 @@
|
|||||||
<ClInclude Include="include\imstb_rectpack.h" />
|
<ClInclude Include="include\imstb_rectpack.h" />
|
||||||
<ClInclude Include="include\imstb_textedit.h" />
|
<ClInclude Include="include\imstb_textedit.h" />
|
||||||
<ClInclude Include="include\imstb_truetype.h" />
|
<ClInclude Include="include\imstb_truetype.h" />
|
||||||
<ClInclude Include="include\Src\CMO.h" />
|
<ClInclude Include="displayplaneclass.h" />
|
||||||
<ClInclude Include="include\Src\DDS.h" />
|
<ClInclude Include="fontclass.h" />
|
||||||
<ClInclude Include="include\Src\LoaderHelpers.h" />
|
<ClInclude Include="fontshaderclass.h" />
|
||||||
<ClInclude Include="include\Src\pch.h" />
|
<ClInclude Include="fpsclass.h" />
|
||||||
<ClInclude Include="include\Src\PlatformHelpers.h" />
|
<ClInclude Include="frustumclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\alphamapshaderclass.h" />
|
<ClInclude Include="inputclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\CelShadingShader.h" />
|
<ClInclude Include="lightclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\Colorshaderclass.h" />
|
<ClInclude Include="lightmapshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\fontshaderclass.h" />
|
<ClInclude Include="lightshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\lightmapshaderclass.h" />
|
<ClInclude Include="Logger.h" />
|
||||||
<ClInclude Include="src\inc\shader\lightshaderclass.h" />
|
<ClInclude Include="modelclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h" />
|
<ClInclude Include="object.h" />
|
||||||
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h" />
|
<ClInclude Include="modellistclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\normalmapshaderclass.h" />
|
<ClInclude Include="Multitextureshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\reflectionshaderclass.h" />
|
<ClInclude Include="normalmapshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\refractionshaderclass.h" />
|
<ClInclude Include="refractionshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\shadermanagerclass.h" />
|
<ClInclude Include="shadermanagerclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\specmapshaderclass.h" />
|
<ClInclude Include="physics.h" />
|
||||||
<ClInclude Include="src\inc\shader\sunlightshaderclass.h" />
|
<ClInclude Include="positionclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\textureshaderclass.h" />
|
<ClInclude Include="reflectionshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\translateshaderclass.h" />
|
<ClInclude Include="rendertextureclass.h" />
|
||||||
<ClInclude Include="src\inc\shader\transparentshaderclass.h" />
|
<ClInclude Include="resources.h" />
|
||||||
<ClInclude Include="src\inc\shader\watershaderclass.h" />
|
<ClInclude Include="specmapshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\system\applicationclass.h" />
|
<ClInclude Include="Spriteclass.h" />
|
||||||
<ClInclude Include="src\inc\system\bitmapclass.h" />
|
<ClInclude Include="systemclass.h" />
|
||||||
<ClInclude Include="src\inc\system\Cameraclass.h" />
|
<ClInclude Include="textclass.h" />
|
||||||
<ClInclude Include="src\inc\system\d3dclass.h" />
|
<ClInclude Include="textureclass.h" />
|
||||||
<ClInclude Include="src\inc\system\displayplaneclass.h" />
|
<ClInclude Include="textureshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\system\fontclass.h" />
|
<ClInclude Include="Timerclass.h" />
|
||||||
<ClInclude Include="src\inc\system\fpsclass.h" />
|
<ClInclude Include="translateshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\system\frustum.h" />
|
<ClInclude Include="transparentshaderclass.h" />
|
||||||
<ClInclude Include="src\inc\system\frustumclass.h" />
|
<ClInclude Include="watershaderclass.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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="src\hlsl\alphamap.ps">
|
<CopyFileToFolders Include="alphamap.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\alphamap.vs">
|
<CopyFileToFolders Include="alphamap.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\celshading.ps">
|
<CopyFileToFolders Include="font.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\celshading.vs">
|
<CopyFileToFolders Include="font.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Color.ps">
|
<CopyFileToFolders Include="light.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Color.vs">
|
<CopyFileToFolders Include="light.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\font.ps">
|
<CopyFileToFolders Include="lightmap.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\font.vs">
|
<CopyFileToFolders Include="lightmap.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\light.ps">
|
<CopyFileToFolders Include="Multitexture.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\light.vs">
|
<CopyFileToFolders Include="Multitexture.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\lightmap.ps">
|
<CopyFileToFolders Include="normalmap.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\lightmap.vs">
|
<CopyFileToFolders Include="normalmap.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Multitexture.ps">
|
<CopyFileToFolders Include="..\KhaoticDemo\water.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\Multitexture.vs">
|
<CopyFileToFolders Include="celshading.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\normalmap.ps">
|
<CopyFileToFolders Include="celshading.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\normalmap.vs">
|
<None Include="packages.config" />
|
||||||
|
<CopyFileToFolders Include="reflection.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\reflection.ps">
|
<CopyFileToFolders Include="reflection.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\reflection.vs">
|
<CopyFileToFolders Include="specmap.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\refraction.ps">
|
<CopyFileToFolders Include="specmap.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\refraction.vs">
|
<CopyFileToFolders Include="texture.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\specmap.ps">
|
<CopyFileToFolders Include="texture.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\specmap.vs">
|
<CopyFileToFolders Include="transparent.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\sunlight.ps">
|
<CopyFileToFolders Include="transparent.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\sunlight.vs">
|
<CopyFileToFolders Include="refraction.ps">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\texture.ps">
|
<CopyFileToFolders Include="refraction.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="src\hlsl\texture.vs">
|
<CopyFileToFolders Include="water.vs">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="src\hlsl\translate.ps">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="src\hlsl\translate.vs">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="src\hlsl\transparent.ps">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\src\hlsl</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<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>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
</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>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CopyFileToFolders Include="alpha01.tga" />
|
||||||
|
<Image Include="dirt01.tga" />
|
||||||
<CopyFileToFolders Include="font01.tga" />
|
<CopyFileToFolders Include="font01.tga" />
|
||||||
<CopyFileToFolders Include="assets\Texture\alpha01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\font01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\ground01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\light01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\marble01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\moss01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\normal01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\spec02.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite02.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite03.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite04.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.tga">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\wall01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\water01.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Texture\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_back.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_bottom.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_front.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_left.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_right.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_top.png">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Skybox\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<Image Include="KhaoticIcon.ico" />
|
<Image Include="KhaoticIcon.ico" />
|
||||||
|
<CopyFileToFolders Include="light01.tga" />
|
||||||
|
<CopyFileToFolders Include="moss01.tga" />
|
||||||
|
<CopyFileToFolders Include="normal01.tga" />
|
||||||
|
<CopyFileToFolders Include="marble01.tga" />
|
||||||
|
<Image Include="papier.tga" />
|
||||||
|
<CopyFileToFolders Include="spec02.tga" />
|
||||||
<CopyFileToFolders Include="sprite01.tga" />
|
<CopyFileToFolders Include="sprite01.tga" />
|
||||||
<CopyFileToFolders Include="sprite02.tga" />
|
<CopyFileToFolders Include="sprite02.tga" />
|
||||||
<CopyFileToFolders Include="sprite03.tga" />
|
<CopyFileToFolders Include="sprite03.tga" />
|
||||||
<CopyFileToFolders Include="sprite04.tga" />
|
<CopyFileToFolders Include="sprite04.tga" />
|
||||||
|
<CopyFileToFolders Include="stone01.tga" />
|
||||||
|
<CopyFileToFolders Include="wall.tga" />
|
||||||
|
<CopyFileToFolders Include="water01.tga" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<CopyFileToFolders Include="cube.txt" />
|
||||||
<CopyFileToFolders Include="font01.txt" />
|
<CopyFileToFolders Include="font01.txt" />
|
||||||
|
<CopyFileToFolders Include="plane.txt" />
|
||||||
|
<CopyFileToFolders Include="bath.txt" />
|
||||||
|
<Text Include="chunk.txt" />
|
||||||
|
<Text Include="sphere.txt" />
|
||||||
|
<CopyFileToFolders Include="sprite_data_01.txt" />
|
||||||
|
<Text Include="square.txt" />
|
||||||
|
<CopyFileToFolders Include="water.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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resources.rc" />
|
<ResourceCompile Include="resources.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
|
<CopyFileToFolders Include="cone.obj">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
|
<CopyFileToFolders Include="isosphere.obj">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
|
<CopyFileToFolders Include="monke.obj">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
|
<CopyFileToFolders Include="vaisseau.obj">
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
|
|
||||||
<FileType>Document</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
<CopyFileToFolders Include="86.obj">
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
|
|
||||||
<FileType>Text</FileType>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\TXT\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<CopyFileToFolders Include="sprite_data_01.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
|
||||||
<FileType>Document</FileType>
|
<FileType>Document</FileType>
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
<DestinationFolders Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)\assets\Model\OBJ\</DestinationFolders>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
@@ -460,7 +280,6 @@
|
|||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<ProjectGuid>{92cf56c4-76bb-40d4-8fe5-36c15f5f127a}</ProjectGuid>
|
<ProjectGuid>{92cf56c4-76bb-40d4-8fe5-36c15f5f127a}</ProjectGuid>
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
<ProjectName>KhaoticCore</ProjectName>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
@@ -541,7 +360,7 @@
|
|||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@@ -558,7 +377,7 @@
|
|||||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include\Inc;$(SolutionDir)enginecustom\include;$(SolutionDir)enginecustom\src\inc\shader;$(SolutionDir)enginecustom\src\inc\system;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)enginecustom\include\backends;$(SolutionDir)enginecustom\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@@ -31,41 +31,35 @@
|
|||||||
<Filter Include="Assets">
|
<Filter Include="Assets">
|
||||||
<UniqueIdentifier>{2978535b-193d-4876-83be-1c3c4470db62}</UniqueIdentifier>
|
<UniqueIdentifier>{2978535b-193d-4876-83be-1c3c4470db62}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Fichiers sources\DirectX Tool Kit">
|
|
||||||
<UniqueIdentifier>{3bfbc604-3b39-4e49-bee2-b942fc5dce8c}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers d%27en-tête\DirectX Tool Kit">
|
|
||||||
<UniqueIdentifier>{d710c862-b37d-4ad5-aa92-2456f9745881}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Assets\Texture">
|
|
||||||
<UniqueIdentifier>{4873a73d-d11c-4d40-b847-b6d7fef4b23d}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Assets\Model">
|
|
||||||
<UniqueIdentifier>{3f3824c5-8a66-4f02-9845-1a9538336592}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Assets\Model\OBJ">
|
|
||||||
<UniqueIdentifier>{22651df1-90a4-4a19-8b97-5147b27d975a}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Assets\Model\TXT">
|
|
||||||
<UniqueIdentifier>{f67d85e0-106e-47a1-bb9c-a5ea9111509a}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers d%27en-tête\Shader">
|
|
||||||
<UniqueIdentifier>{e087647e-a306-4246-9320-bab0830bb634}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers sources\Shader">
|
|
||||||
<UniqueIdentifier>{3c669b93-a9fd-4b74-813f-f9780413f76b}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Fichiers sources\System">
|
|
||||||
<UniqueIdentifier>{b2659b1e-695d-488e-9a1c-341691d312bc}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Main.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Systemclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="inputclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="applicationclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="d3dclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Colorshaderclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="modelclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Cameraclass.cpp">
|
||||||
|
<Filter>Fichiers sources</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="include\imgui_demo.cpp">
|
||||||
|
<Filter>Fichiers sources\ImGui</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="include\backends\imgui_impl_dx11.cpp">
|
<ClCompile Include="include\backends\imgui_impl_dx11.cpp">
|
||||||
<Filter>Fichiers sources\ImGui</Filter>
|
<Filter>Fichiers sources\ImGui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -84,146 +78,125 @@
|
|||||||
<ClCompile Include="include\imgui_widgets.cpp">
|
<ClCompile Include="include\imgui_widgets.cpp">
|
||||||
<Filter>Fichiers sources\ImGui</Filter>
|
<Filter>Fichiers sources\ImGui</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="include\Src\DDSTextureLoader.cpp">
|
<ClCompile Include="imguiManager.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="include\Src\DirectXHelpers.cpp">
|
<ClCompile Include="lightclass.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="include\Src\pch.cpp">
|
<ClCompile Include="lightshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="include\Src\SimpleMath.cpp">
|
<ClCompile Include="object.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="include\Src\WICTextureLoader.cpp">
|
<ClCompile Include="textureclass.cpp">
|
||||||
<Filter>Fichiers sources\DirectX Tool Kit</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\alphamapshaderclass.cpp">
|
<ClCompile Include="bitmapclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\CelShadingShader.cpp">
|
<ClCompile Include="fontclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\Colorshaderclass.cpp">
|
<ClCompile Include="fontshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\lightmapshaderclass.cpp">
|
<ClCompile Include="fpsclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\lightshaderclass.cpp">
|
<ClCompile Include="Spriteclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\Multitextureshaderclass.cpp">
|
<ClCompile Include="Multitextureshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\normalmapshaderclass.cpp">
|
<ClCompile Include="textclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\reflectionshaderclass.cpp">
|
<ClCompile Include="textureshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\refractionshaderclass.cpp">
|
<ClCompile Include="Timerclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\shadermanagerclass.cpp">
|
<ClCompile Include="fpsclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\specmapshaderclass.cpp">
|
<ClCompile Include="alphamapshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\sunlightshaderclass.cpp">
|
<ClCompile Include="specmapshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\textureshaderclass.cpp">
|
<ClCompile Include="frustumclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\translateshaderclass.cpp">
|
<ClCompile Include="modellistclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\transparentshaderclass.cpp">
|
<ClCompile Include="positionclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\shader\watershaderclass.cpp">
|
<ClCompile Include="displayplaneclass.cpp">
|
||||||
<Filter>Fichiers sources\Shader</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\applicationclass.cpp">
|
<ClCompile Include="rendertextureclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\bitmapclass.cpp">
|
<ClCompile Include="translateshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\Cameraclass.cpp">
|
<ClCompile Include="reflectionshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\d3dclass.cpp">
|
<ClCompile Include="shadermanagerclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\displayplaneclass.cpp">
|
<ClCompile Include="transparentshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\fontclass.cpp">
|
<ClCompile Include="lightmapshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\fpsclass.cpp">
|
<ClCompile Include="watershaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\frustum.cpp">
|
<ClCompile Include="refractionshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\frustumclass.cpp">
|
<ClCompile Include="physics.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\imguiManager.cpp">
|
<ClCompile Include="normalmapshaderclass.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\src\system\inputclass.cpp">
|
<ClCompile Include="CelShadingShader.cpp">
|
||||||
<Filter>Fichiers sources\System</Filter>
|
<Filter>Fichiers sources</Filter>
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\src\system\lightclass.cpp">
|
|
||||||
<Filter>Fichiers sources\System</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\src\system\Main.cpp">
|
|
||||||
<Filter>Fichiers sources\System</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\src\system\modelclass.cpp">
|
|
||||||
<Filter>Fichiers sources\System</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="src\src\system\Modellistclass.cpp">
|
|
||||||
<Filter>Fichiers sources\System</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<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>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="systemclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="inputclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="applicationclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="d3dclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Colorshaderclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="modelclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Cameraclass.h">
|
||||||
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="include\imconfig.h">
|
<ClInclude Include="include\imconfig.h">
|
||||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -248,340 +221,304 @@
|
|||||||
<ClInclude Include="include\backends\imgui_impl_win32.h">
|
<ClInclude Include="include\backends\imgui_impl_win32.h">
|
||||||
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
<Filter>Fichiers d%27en-tête\ImGui</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="include\Src\CMO.h">
|
<ClInclude Include="imguiManager.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="include\Src\DDS.h">
|
<ClInclude Include="lightshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="include\Src\LoaderHelpers.h">
|
<ClInclude Include="object.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="include\Src\pch.h">
|
<ClInclude Include="textureclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="include\Src\PlatformHelpers.h">
|
<ClInclude Include="bitmapclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\DirectX Tool Kit</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\alphamapshaderclass.h">
|
<ClInclude Include="fontclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\CelShadingShader.h">
|
<ClInclude Include="fontshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\Colorshaderclass.h">
|
<ClInclude Include="fpsclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\fontshaderclass.h">
|
<ClInclude Include="lightclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\lightmapshaderclass.h">
|
<ClInclude Include="Multitextureshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\lightshaderclass.h">
|
<ClInclude Include="Spriteclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\lightshaderwaterclass.h">
|
<ClInclude Include="textclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\Multitextureshaderclass.h">
|
<ClInclude Include="textureshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\normalmapshaderclass.h">
|
<ClInclude Include="Timerclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\reflectionshaderclass.h">
|
<ClInclude Include="fpsclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\refractionshaderclass.h">
|
<ClInclude Include="lightmapshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\shadermanagerclass.h">
|
<ClInclude Include="alphamapshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\specmapshaderclass.h">
|
<ClInclude Include="normalmapshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\sunlightshaderclass.h">
|
<ClInclude Include="specmapshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\textureshaderclass.h">
|
<ClInclude Include="frustumclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\translateshaderclass.h">
|
<ClInclude Include="modellistclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\transparentshaderclass.h">
|
<ClInclude Include="positionclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\shader\watershaderclass.h">
|
<ClInclude Include="displayplaneclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\Shader</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\applicationclass.h">
|
<ClInclude Include="rendertextureclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\bitmapclass.h">
|
<ClInclude Include="translateshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\Cameraclass.h">
|
<ClInclude Include="reflectionshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\d3dclass.h">
|
<ClInclude Include="resources.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\displayplaneclass.h">
|
<ClInclude Include="shadermanagerclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\fontclass.h">
|
<ClInclude Include="transparentshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\fpsclass.h">
|
<ClInclude Include="Logger.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\frustum.h">
|
<ClInclude Include="watershaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\frustumclass.h">
|
<ClInclude Include="refractionshaderclass.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\imguiManager.h">
|
<ClInclude Include="physics.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="src\inc\system\inputclass.h">
|
<ClInclude Include="CelShadingShader.h">
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
<Filter>Fichiers d%27en-tête</Filter>
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="src\inc\system\lightclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="src\inc\system\Logger.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="src\inc\system\modelclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="src\inc\system\Modellistclass.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="src\inc\system\object.h">
|
|
||||||
<Filter>Fichiers d%27en-tête\System</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<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>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Image Include="papier.tga">
|
||||||
|
<Filter>assets</Filter>
|
||||||
|
</Image>
|
||||||
|
<Image Include="dirt01.tga">
|
||||||
|
<Filter>assets</Filter>
|
||||||
|
</Image>
|
||||||
<Image Include="KhaoticIcon.ico">
|
<Image Include="KhaoticIcon.ico">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets</Filter>
|
||||||
</Image>
|
</Image>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="sphere.txt">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="square.txt">
|
||||||
|
<Filter>assets</Filter>
|
||||||
|
</Text>
|
||||||
|
<Text Include="chunk.txt">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</Text>
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resources.rc">
|
<ResourceCompile Include="resources.rc">
|
||||||
<Filter>Fichiers de ressources</Filter>
|
<Filter>Fichiers de ressources</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<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">
|
<CopyFileToFolders Include="font01.txt">
|
||||||
<Filter>Fonts</Filter>
|
<Filter>Fonts</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="font01.tga">
|
<CopyFileToFolders Include="font01.tga">
|
||||||
<Filter>fonts</Filter>
|
<Filter>fonts</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\bath.txt">
|
<CopyFileToFolders Include="stone01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\chunk.txt">
|
<CopyFileToFolders Include="cube.txt">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\cube.txt">
|
<CopyFileToFolders Include="plane.txt">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\ground.txt">
|
<CopyFileToFolders Include="alpha01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\plane.txt">
|
<CopyFileToFolders Include="light01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\sphere.txt">
|
<CopyFileToFolders Include="moss01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\square.txt">
|
<CopyFileToFolders Include="normal01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\wall.txt">
|
<CopyFileToFolders Include="spec02.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\TXT\water.txt">
|
<CopyFileToFolders Include="sprite01.tga">
|
||||||
<Filter>Assets\Model\TXT</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\vaisseau.obj">
|
<CopyFileToFolders Include="sprite02.tga">
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\monke.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\isosphere.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\cone.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\86.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite_data_01.txt">
|
<CopyFileToFolders Include="sprite_data_01.txt">
|
||||||
<Filter>Assets</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.tga">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\alpha01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\Bricks2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksGLOSS2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\BricksNRM2K.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\dirt01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\font01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\ground01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\light01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\marble01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\moss01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\normal01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\spec02.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite02.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite03.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Model\OBJ\plane.obj">
|
|
||||||
<Filter>Assets\Model\OBJ</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\EmptyTexture.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\stone01.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="sprite01.tga">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="sprite02.tga">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="sprite03.tga">
|
<CopyFileToFolders Include="sprite03.tga">
|
||||||
<Filter>Assets\Texture</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
|
||||||
<CopyFileToFolders Include="assets\Texture\sprite04.png">
|
|
||||||
<Filter>Assets\Texture</Filter>
|
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="sprite04.tga">
|
<CopyFileToFolders Include="sprite04.tga">
|
||||||
<Filter>Assets\Texture</Filter>
|
<Filter>Assets</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\wall.png">
|
<CopyFileToFolders Include="Color.ps">
|
||||||
<Filter>Assets\Texture</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\wall01.png">
|
<CopyFileToFolders Include="light.vs">
|
||||||
<Filter>Assets\Texture</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Texture\water01.png">
|
<CopyFileToFolders Include="lightmap.ps">
|
||||||
<Filter>Assets\Texture</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_back.png">
|
<CopyFileToFolders Include="lightmap.vs">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_bottom.png">
|
<CopyFileToFolders Include="reflection.ps">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_front.png">
|
<CopyFileToFolders Include="reflection.vs">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_left.png">
|
<CopyFileToFolders Include="translate.ps">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_right.png">
|
<CopyFileToFolders Include="translate.vs">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</CopyFileToFolders>
|
||||||
<CopyFileToFolders Include="assets\Skybox\skybox_top.png">
|
<CopyFileToFolders Include="transparent.ps">
|
||||||
<Filter>Assets\Skybox</Filter>
|
<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="wall.tga">
|
||||||
|
<Filter>assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="water01.tga">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="bath.txt">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="marble01.tga">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="water.txt">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="isosphere.obj">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="cone.obj">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="monke.obj">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="vaisseau.obj">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="86.obj">
|
||||||
|
<Filter>Assets</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="celshading.vs">
|
||||||
|
<Filter>shader</Filter>
|
||||||
|
</CopyFileToFolders>
|
||||||
|
<CopyFileToFolders Include="celshading.ps">
|
||||||
|
<Filter>shader</Filter>
|
||||||
</CopyFileToFolders>
|
</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>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@@ -9,6 +9,7 @@ cbuffer PixelBuffer
|
|||||||
float4 pixelColor;
|
float4 pixelColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
// TYPEDEFS //
|
// TYPEDEFS //
|
||||||
//////////////
|
//////////////
|
||||||
@@ -25,17 +26,22 @@ float4 FontPixelShader(PixelInputType input) : SV_TARGET
|
|||||||
{
|
{
|
||||||
float4 color;
|
float4 color;
|
||||||
|
|
||||||
|
|
||||||
// Sample the texture pixel at this location.
|
// Sample the texture pixel at this location.
|
||||||
color = shaderTexture.Sample(SampleType, input.tex);
|
color = shaderTexture.Sample(SampleType, input.tex);
|
||||||
|
|
||||||
// If the color is black on the texture then treat this pixel as transparent.
|
// If the color is black on the texture then treat this pixel as transparent.
|
||||||
if (color.r == 0.0f && color.g == 0.0f && color.b == 0.0f)
|
if(color.r == 0.0f)
|
||||||
{
|
{
|
||||||
return color / color;
|
color.a = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the color is other than black on the texture then this is a pixel in the font so draw it using the font pixel color.
|
// If the color is other than black on the texture then this is a pixel in the font so draw it using the font pixel color.
|
||||||
color = color * pixelColor;
|
else
|
||||||
|
{
|
||||||
|
color.a = 1.0f;
|
||||||
|
color = color * pixelColor;
|
||||||
|
}
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|