Skip to content

Commit

Permalink
Updated Tutorial01-07 to use fxh instead of fx for simpler setup
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Nov 18, 2020
1 parent 9d21ad8 commit 8120484
Show file tree
Hide file tree
Showing 51 changed files with 164 additions and 179 deletions.
Binary file modified Direct3D11Tutorials/Readme.docx
Binary file not shown.
4 changes: 2 additions & 2 deletions Direct3D11Tutorials/Tutorial02/Tutorial02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ HRESULT InitDevice()

// Compile the vertex shader
ID3DBlob* pVSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial02.fx", "VS", "vs_4_0", &pVSBlob );
hr = CompileShaderFromFile( L"Tutorial02.fxh", "VS", "vs_4_0", &pVSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down Expand Up @@ -366,7 +366,7 @@ HRESULT InitDevice()

// Compile the pixel shader
ID3DBlob* pPSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial02.fx", "PS", "ps_4_0", &pPSBlob );
hr = CompileShaderFromFile( L"Tutorial02.fxh", "PS", "ps_4_0", &pPSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial02/Tutorial02_2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial02.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial02_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial02.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial02.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial02.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial02_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial02_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
<ItemGroup>
<None Include="Tutorial02.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial02/Tutorial02_2019.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial02.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial02_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial02.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial02.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
10 changes: 6 additions & 4 deletions Direct3D11Tutorials/Tutorial02/Tutorial02_2019.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial02.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial02_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial02_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
</Project>
<ItemGroup>
<None Include="Tutorial02.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial02/Tutorial02_PS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial02.fx"
#include "Tutorial02.fxh"
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial02/Tutorial02_VS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial02.fx"
#include "Tutorial02.fxh"
4 changes: 2 additions & 2 deletions Direct3D11Tutorials/Tutorial03/Tutorial03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ HRESULT InitDevice()

// Compile the vertex shader
ID3DBlob* pVSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial03.fx", "VS", "vs_4_0", &pVSBlob );
hr = CompileShaderFromFile( L"Tutorial03.fxh", "VS", "vs_4_0", &pVSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down Expand Up @@ -366,7 +366,7 @@ HRESULT InitDevice()

// Compile the pixel shader
ID3DBlob* pPSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial03.fx", "PS", "ps_4_0", &pPSBlob );
hr = CompileShaderFromFile( L"Tutorial03.fxh", "PS", "ps_4_0", &pPSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial03/Tutorial03_2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial03.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial03_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial03.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial03.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial03.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial03_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial03_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
<ItemGroup>
<None Include="Tutorial03.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial03/Tutorial03_2019.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial03.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial03_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial03.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial03.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
10 changes: 6 additions & 4 deletions Direct3D11Tutorials/Tutorial03/Tutorial03_2019.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial03.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial03_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial03_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
</Project>
<ItemGroup>
<None Include="Tutorial03.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial03/Tutorial03_PS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial03.fx"
#include "Tutorial03.fxh"
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial03/Tutorial03_VS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial03.fx"
#include "Tutorial03.fxh"
4 changes: 2 additions & 2 deletions Direct3D11Tutorials/Tutorial04/Tutorial04.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ HRESULT InitDevice()

// Compile the vertex shader
ID3DBlob* pVSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial04.fx", "VS", "vs_4_0", &pVSBlob );
hr = CompileShaderFromFile( L"Tutorial04.fxh", "VS", "vs_4_0", &pVSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down Expand Up @@ -381,7 +381,7 @@ HRESULT InitDevice()

// Compile the pixel shader
ID3DBlob* pPSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial04.fx", "PS", "ps_4_0", &pPSBlob );
hr = CompileShaderFromFile( L"Tutorial04.fxh", "PS", "ps_4_0", &pPSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial04/Tutorial04_2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial04.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial04_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial04.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial04.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial04.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial04_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial04_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
<ItemGroup>
<None Include="Tutorial04.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial04/Tutorial04_2019.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial04.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial04_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial04.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial04.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
10 changes: 6 additions & 4 deletions Direct3D11Tutorials/Tutorial04/Tutorial04_2019.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<FxCompile Include="Tutorial04.fx">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial04_PS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
<FxCompile Include="Tutorial04_VS.hlsl">
<Filter>Shaders</Filter>
</FxCompile>
</ItemGroup>
</Project>
<ItemGroup>
<None Include="Tutorial04.fxh">
<Filter>Shaders</Filter>
</None>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial04/Tutorial04_PS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial04.fx"
#include "Tutorial04.fxh"
2 changes: 1 addition & 1 deletion Direct3D11Tutorials/Tutorial04/Tutorial04_VS.hlsl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#include "Tutorial04.fx"
#include "Tutorial04.fxh"
4 changes: 2 additions & 2 deletions Direct3D11Tutorials/Tutorial05/Tutorial05.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ HRESULT InitDevice()

// Compile the vertex shader
ID3DBlob* pVSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial05.fx", "VS", "vs_4_0", &pVSBlob );
hr = CompileShaderFromFile( L"Tutorial05.fxh", "VS", "vs_4_0", &pVSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down Expand Up @@ -410,7 +410,7 @@ HRESULT InitDevice()

// Compile the pixel shader
ID3DBlob* pPSBlob = nullptr;
hr = CompileShaderFromFile( L"Tutorial05.fx", "PS", "ps_4_0", &pPSBlob );
hr = CompileShaderFromFile( L"Tutorial05.fxh", "PS", "ps_4_0", &pPSBlob );
if( FAILED( hr ) )
{
MessageBox( nullptr,
Expand Down
9 changes: 1 addition & 8 deletions Direct3D11Tutorials/Tutorial05/Tutorial05_2017.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<FxCompile Include="Tutorial05.fx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</FxCompile>
<FxCompile Include="Tutorial05_PS.hlsl">
<EntryPointName Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">PS</EntryPointName>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'">Pixel</ShaderType>
Expand Down Expand Up @@ -405,6 +397,7 @@
<ResourceCompile Include="Tutorial05.rc" />
</ItemGroup>
<ItemGroup>
<None Include="Tutorial05.fxh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
Expand Down
Loading

0 comments on commit 8120484

Please sign in to comment.