Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GamebabyRockSun_QQ
GRSD3D12Sample
提交
792a6172
G
GRSD3D12Sample
项目概览
GamebabyRockSun_QQ
/
GRSD3D12Sample
大约 1 年 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
G
GRSD3D12Sample
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
792a6172
编写于
6月 23, 2021
作者:
GamebabyRockSun_QQ
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了第17号示例的bug,添加第18号示例,详情见修改日志
上级
6d1d7d30
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1727 addition
and
185 deletion
+1727
-185
17-D3D12_Assimp_Animation/17-D3D12_Assimp_Animation.cpp
17-D3D12_Assimp_Animation/17-D3D12_Assimp_Animation.cpp
+152
-170
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.cpp
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.cpp
+1164
-0
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj
+157
-0
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.filters
...ase-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.filters
+33
-0
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.user
...R-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.user
+4
-0
18-PBR-Base-Point-Lights/Shader/PS_PBR_Base_Point_Lights.hlsl
...BR-Base-Point-Lights/Shader/PS_PBR_Base_Point_Lights.hlsl
+146
-0
18-PBR-Base-Point-Lights/Shader/VS.hlsl
18-PBR-Base-Point-Lights/Shader/VS.hlsl
+30
-0
Commons/GRS_Assimp_Loader.h
Commons/GRS_Assimp_Loader.h
+15
-15
D3D12 Tutorials.sln
D3D12 Tutorials.sln
+14
-0
Revision.md
Revision.md
+12
-0
未找到文件。
17-D3D12_Assimp_Animation/17-D3D12_Assimp_Animation.cpp
浏览文件 @
792a6172
此差异已折叠。
点击以展开。
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.cpp
0 → 100644
浏览文件 @
792a6172
此差异已折叠。
点击以展开。
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj
0 → 100644
浏览文件 @
792a6172
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<VCProjectVersion>
16.0
</VCProjectVersion>
<Keyword>
Win32Proj
</Keyword>
<ProjectGuid>
{c537ac94-2f18-4ab5-84ef-16b584566923}
</ProjectGuid>
<RootNamespace>
My18PBRBasePointLights
</RootNamespace>
<WindowsTargetPlatformVersion>
10.0
</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.Default.props"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
</ImportGroup>
<ImportGroup
Label=
"Shared"
>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<LinkIncremental>
true
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<LinkIncremental>
false
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<LinkIncremental>
true
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<LinkIncremental>
false
</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Console
</SubSystem>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Windows
</SubSystem>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Windows
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile
Include=
"18-PBR-Base-Point-Lights.cpp"
/>
</ItemGroup>
<ItemGroup>
<FxCompile
Include=
"Shader\PS_PBR_Base_Point_Lights.hlsl"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</FxCompile>
<FxCompile
Include=
"Shader\VS.hlsl"
>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
true
</ExcludedFromBuild>
<ExcludedFromBuild
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
true
</ExcludedFromBuild>
</FxCompile>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
\ No newline at end of file
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.filters
0 → 100644
浏览文件 @
792a6172
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup>
<Filter
Include=
"源文件"
>
<UniqueIdentifier>
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
</UniqueIdentifier>
<Extensions>
cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
</Extensions>
</Filter>
<Filter
Include=
"头文件"
>
<UniqueIdentifier>
{93995380-89BD-4b04-88EB-625FBE52EBFB}
</UniqueIdentifier>
<Extensions>
h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
</Extensions>
</Filter>
<Filter
Include=
"资源文件"
>
<UniqueIdentifier>
{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
</UniqueIdentifier>
<Extensions>
rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
</Extensions>
</Filter>
<Filter
Include=
"Shader"
>
<UniqueIdentifier>
{d8d991aa-df75-4486-94c8-387fb1221b64}
</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile
Include=
"18-PBR-Base-Point-Lights.cpp"
>
<Filter>
源文件
</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<FxCompile
Include=
"Shader\PS_PBR_Base_Point_Lights.hlsl"
>
<Filter>
Shader
</Filter>
</FxCompile>
<FxCompile
Include=
"Shader\VS.hlsl"
>
<Filter>
Shader
</Filter>
</FxCompile>
</ItemGroup>
</Project>
\ No newline at end of file
18-PBR-Base-Point-Lights/18-PBR-Base-Point-Lights.vcxproj.user
0 → 100644
浏览文件 @
792a6172
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
/>
</Project>
\ No newline at end of file
18-PBR-Base-Point-Lights/Shader/PS_PBR_Base_Point_Lights.hlsl
0 → 100644
浏览文件 @
792a6172
// Simplified PBR HLSL
static
const
float
PI
=
3
.
14159265359
;
cbuffer
MVPBuffer
:
register
(
b0
)
{
float4x4
mxWorld
;
//世界矩阵,这里其实是Model->World的转换矩阵
float4x4
mxView
;
//视矩阵
float4x4
mxProjection
;
//投影矩阵
float4x4
mxViewProj
;
//视矩阵*投影
float4x4
mxMVP
;
//世界*视矩阵*投影
};
// Camera
cbuffer
ST_CB_CAMERA
:
register
(
b1
)
{
float4
g_v4CameraPos
;
};
#define GRS_LIGHT_COUNT 8
// lights
cbuffer
ST_CB_LIGHTS
:
register
(
b2
)
{
float4
g_v4LightPos
[
GRS_LIGHT_COUNT
];
float4
g_v4LightClr
[
GRS_LIGHT_COUNT
];
};
// PBR material parameters
cbuffer
ST_CB_PBR_MATERIAL
:
register
(
b3
)
{
float3
g_v3Albedo
;
// 反射率
float
g_fMetallic
;
// 金属度
float
g_fRoughness
;
// 粗糙度
float
g_fAO
;
// 环境光遮蔽
};
struct
PSInput
{
float4
g_v4PosWVP
:
SV_POSITION
;
float4
g_v4PosWorld
:
POSITION
;
float4
g_v4Normal
:
NORMAL
;
float2
g_v2UV
:
TEXCOORD
;
};
float3
Fresnel_Schlick
(
float
cosTheta
,
float3
F0
)
{
return
F0
+
(
1
.
0
-
F0
)
*
pow
(
1
.
0
-
cosTheta
,
5
.
0
);
}
float
Distribution_GGX
(
float3
N
,
float3
H
,
float
fRoughness
)
{
float
a
=
fRoughness
*
fRoughness
;
float
a2
=
a
*
a
;
float
NdotH
=
max
(
dot
(
N
,
H
),
0
.
0
);
float
NdotH2
=
NdotH
*
NdotH
;
float
num
=
a2
;
float
denom
=
(
NdotH2
*
(
a2
-
1
.
0
)
+
1
.
0
);
denom
=
PI
*
denom
*
denom
;
return
num
/
denom
;
}
float
Geometry_Schlick_GGX
(
float
NdotV
,
float
fRoughness
)
{
float
r
=
(
fRoughness
+
1
.
0
);
float
k
=
(
r
*
r
)
/
8
.
0
;
float
num
=
NdotV
;
float
denom
=
NdotV
*
(
1
.
0
-
k
)
+
k
;
return
num
/
denom
;
}
float
Geometry_Smith
(
float3
N
,
float3
V
,
float3
L
,
float
fRoughness
)
{
float
NdotV
=
max
(
dot
(
N
,
V
),
0
.
0
);
float
NdotL
=
max
(
dot
(
N
,
L
),
0
.
0
);
float
ggx2
=
Geometry_Schlick_GGX
(
NdotV
,
fRoughness
);
float
ggx1
=
Geometry_Schlick_GGX
(
NdotL
,
fRoughness
);
return
ggx1
*
ggx2
;
}
float4
PSMain
(
PSInput
stPSInput
)
:
SV_TARGET
{
// 使用插值生成的光滑法线
float3
N
=
normalize
(
stPSInput
.
g_v4Normal
.
xyz
);
// 视向量
float3
V
=
normalize
(
g_v4CameraPos
.
xyz
-
stPSInput
.
g_v4PosWorld
.
xyz
);
float3
F0
=
float3
(
0
.
04
f
,
0
.
04
f
,
0
.
04
f
);
// Gamma矫正颜色
float3
v3Albedo
=
pow
(
g_v3Albedo
,
2
.
2
f
);
F0
=
lerp
(
F0
,
v3Albedo
,
g_fMetallic
);
// 出射辐射度
float3
Lo
=
float3
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
// 粗糙度
float
fRoughness
=
g_fRoughness
;
for
(
int
i
=
0
;
i
<
GRS_LIGHT_COUNT
;
++
i
)
{
// 对每一个光源求解光照积分方程
// 点光源的情况
// 入射光向量
float3
L
=
normalize
(
g_v4LightPos
[
i
].
xyz
-
stPSInput
.
g_v4PosWorld
.
xyz
);
// 中间向量(入射光与法线的角平分线)
float3
H
=
normalize
(
V
+
L
);
float
distance
=
length
(
g_v4LightPos
[
i
].
xyz
-
stPSInput
.
g_v4PosWorld
.
xyz
);
float
attenuation
=
1
.
0
/
(
distance
*
distance
);
float3
radiance
=
g_v4LightClr
[
i
].
xyz
*
attenuation
;
// Cook-Torrance光照模型 BRDF
float
NDF
=
Distribution_GGX
(
N
,
H
,
fRoughness
);
float
G
=
Geometry_Smith
(
N
,
V
,
L
,
fRoughness
);
float3
F
=
Fresnel_Schlick
(
max
(
dot
(
H
,
V
),
0
.
0
),
F0
);
float3
kS
=
F
;
float3
kD
=
float3
(
1
.
0
f
,
1
.
0
f
,
1
.
0
f
)
-
kS
;
kD
*=
1
.
0
-
g_fMetallic
;
float3
numerator
=
NDF
*
G
*
F
;
float
denominator
=
4
.
0
*
max
(
dot
(
N
,
V
),
0
.
0
)
*
max
(
dot
(
N
,
L
),
0
.
0
);
float3
specular
=
numerator
/
max
(
denominator
,
0
.
001
);
// add to outgoing radiance Lo
float
NdotL
=
max
(
dot
(
N
,
L
),
0
.
0
);
Lo
+=
(
kD
*
v3Albedo
/
PI
+
specular
)
*
radiance
*
NdotL
;
}
float
fAO
=
g_fAO
;
// 环境光项
float3
ambient
=
float3
(
0
.
03
f
,
0
.
03
f
,
0
.
03
f
)
*
v3Albedo
*
fAO
;
float3
color
=
ambient
+
Lo
;
color
=
color
/
(
color
+
float3
(
1
.
0
f
,
1
.
0
f
,
1
.
0
f
)
);
// Gamma 矫正
color
=
pow
(
color
,
1
.
0
f
/
2
.
2
f
);
return
float4
(
color
,
1
.
0
);
}
18-PBR-Base-Point-Lights/Shader/VS.hlsl
0 → 100644
浏览文件 @
792a6172
// Simplified PBR HLSL Vertex Shader
cbuffer
MVPBuffer
:
register
(
b0
)
{
float4x4
mxWorld
;
//世界矩阵,这里其实是Model->World的转换矩阵
float4x4
mxView
;
//视矩阵
float4x4
mxProjection
;
//投影矩阵
float4x4
mxViewProj
;
//视矩阵*投影
float4x4
mxMVP
;
//世界*视矩阵*投影
};
struct
PSInput
{
float4
m_v4PosWVP
:
SV_POSITION
;
float4
m_v4PosWorld
:
POSITION
;
float4
m_v4Normal
:
NORMAL
;
float2
m_v2UV
:
TEXCOORD
;
};
PSInput
VSMain
(
float4
v4LocalPos
:
POSITION
,
float4
v4LocalNormal
:
NORMAL
,
float2
v2UV
:
TEXCOORD
)
{
PSInput
stOutput
;
stOutput
.
m_v4PosWVP
=
mul
(
v4LocalPos
,
mxMVP
);
stOutput
.
m_v4PosWorld
=
mul
(
v4LocalPos
,
mxWorld
);
v4LocalNormal
.
w
=
0
.
0
f
;
stOutput
.
m_v4Normal
=
mul
(
v4LocalNormal
,
mxWorld
);
stOutput
.
m_v2UV
=
v2UV
;
return
stOutput
;
}
\ No newline at end of file
Commons/GRS_Assimp_Loader.h
浏览文件 @
792a6172
...
@@ -95,26 +95,26 @@ typedef CAtlArray<ST_GRS_SUBMESH_DATA> CGRSSubMesh;
...
@@ -95,26 +95,26 @@ typedef CAtlArray<ST_GRS_SUBMESH_DATA> CGRSSubMesh;
const
UINT
g_ncSlotCnt
=
4
;
// 用4个插槽上传顶点数据
const
UINT
g_ncSlotCnt
=
4
;
// 用4个插槽上传顶点数据
struct
ST_GRS_MESH_DATA
struct
ST_GRS_MESH_DATA
{
{
XMMATRIX
m_mx
Model
;
const
aiScene
*
m_pai
Model
;
CStringA
m_strFileName
;
CStringA
m_strFileName
;
const
aiScene
*
m_pai
Model
;
XMMATRIX
m_mx
Model
;
CGRSSubMesh
m_arSubMeshInfo
;
CGRSSubMesh
m_arSubMeshInfo
;
CGRSARPositions
m_arPositions
;
CGRSARPositions
m_arPositions
;
CGRSARNormals
m_arNormals
;
CGRSARNormals
m_arNormals
;
CGRSARTexCoords
m_arTexCoords
;
CGRSARTexCoords
m_arTexCoords
;
CGRSARVertexBones
m_arBoneIndices
;
CGRSARVertexBones
m_arBoneIndices
;
CGRSARIndices
m_arIndices
;
CGRSARIndices
m_arIndices
;
//CGRSARTTextureName m_arTextureName;
CGRSMapString2UINT
m_mapTextrueName2Index
;
CGRSMapString2UINT
m_mapTextrueName2Index
;
CGRSMapUINT2UINT
m_mapTextureIndex2HeapIndex
;
CGRSMapUINT2UINT
m_mapTextureIndex2HeapIndex
;
CGRSARBoneDatas
m_arBoneDatas
;
CGRSARBoneDatas
m_arBoneDatas
;
CGRSMapString2UINT
m_mapName2Bone
;
//名称->骨骼的索引
CGRSMapString2UINT
m_mapName2Bone
;
//名称->骨骼的索引
CGRSMapString2UINT
m_mapAnimName2Index
;
//名称->动画的索引
CGRSMapString2UINT
m_mapAnimName2Index
;
//名称->动画的索引
UINT
m_nCurrentAnimIndex
;
// 当前播放的动画序列索引
UINT
m_nCurrentAnimIndex
;
// 当前播放的动画序列索引(当前动作)
};
};
__inline
const
XMMATRIX
&
MXEqual
(
XMMATRIX
&
mxDX
,
const
aiMatrix4x4
&
mxAI
)
__inline
const
XMMATRIX
&
MXEqual
(
XMMATRIX
&
mxDX
,
const
aiMatrix4x4
&
mxAI
)
...
...
D3D12 Tutorials.sln
浏览文件 @
792a6172
...
@@ -37,6 +37,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16-Assimp_Data_Display", "1
...
@@ -37,6 +37,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "16-Assimp_Data_Display", "1
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17-D3D12_Assimp_Animation", "17-D3D12_Assimp_Animation\17-D3D12_Assimp_Animation.vcxproj", "{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "17-D3D12_Assimp_Animation", "17-D3D12_Assimp_Animation\17-D3D12_Assimp_Animation.vcxproj", "{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}"
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "18-PBR-Base-Point-Lights", "18-PBR-Base-Point-Lights\18-PBR-Base-Point-Lights.vcxproj", "{C537AC94-2F18-4AB5-84EF-16B584566923}"
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x64 = Debug|x64
...
@@ -251,6 +253,18 @@ Global
...
@@ -251,6 +253,18 @@ Global
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x64.Build.0 = Release|x64
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x64.Build.0 = Release|x64
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x86.ActiveCfg = Release|Win32
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x86.ActiveCfg = Release|Win32
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x86.Build.0 = Release|Win32
{6BFFBD6C-B171-4C22-8878-4BCAFBE4CF0F}.Release|x86.Build.0 = Release|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Debug|x64.ActiveCfg = Debug|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Debug|x64.Build.0 = Debug|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Debug|x86.ActiveCfg = Debug|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Debug|x86.Build.0 = Debug|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Profile|x64.ActiveCfg = Debug|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Profile|x64.Build.0 = Debug|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Profile|x86.ActiveCfg = Debug|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Profile|x86.Build.0 = Debug|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Release|x64.ActiveCfg = Release|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Release|x64.Build.0 = Release|x64
{C537AC94-2F18-4AB5-84EF-16B584566923}.Release|x86.ActiveCfg = Release|Win32
{C537AC94-2F18-4AB5-84EF-16B584566923}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
HideSolutionNode = FALSE
...
...
Revision.md
浏览文件 @
792a6172
...
@@ -82,3 +82,15 @@ D3D12 ERROR: ID3D12CommandQueue::Present: Resource state (0x800: D3D12_RESOURCE_
...
@@ -82,3 +82,15 @@ D3D12 ERROR: ID3D12CommandQueue::Present: Resource state (0x800: D3D12_RESOURCE_
2021-6-16
2021-6-16
1、调整了16号例子中的输出格式,并且追加了显示metadata的代码;
1、调整了16号例子中的输出格式,并且追加了显示metadata的代码;
2021-6-18
1、去除17号示例中的冗余代码,修正了部分注释;
2021-6-19
1、修正17号示例中,计算缓冲大小错误的BUG,之前的计算在顶点数据小时不会有问题,当顶点数据过大时就报错了,原因是每个缓冲都按照边界对齐分配了,但是缓冲是整体按边界对齐大小分配的,所以在某个缓冲较大时就会出错了,实际分配的缓冲大小会小于需要的缓冲大小;
2021-6-22
1、添加第18个示例,18-PBR-Base-Point-Lights,开启高级光照之旅,直接略过无聊的传统光照;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录