diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-18 01:26:07 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-18 01:26:07 +0000 |
| commit | 085e1e07fe61386e46395fa06deee96479f44f5a (patch) | |
| tree | 6e11d0406f72548fe697bb448ea23814b4c3fecd /Projects | |
| parent | Updated readme (diff) | |
| download | DiligentEngine-085e1e07fe61386e46395fa06deee96479f44f5a.tar.gz DiligentEngine-085e1e07fe61386e46395fa06deee96479f44f5a.zip | |
Asteroids demo: enabled bindless mode in DiligentD3D12 and DiligentVk modes
Diffstat (limited to 'Projects')
| -rw-r--r-- | Projects/Asteroids/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | Projects/Asteroids/asteroids.vcxproj | 289 | ||||
| -rw-r--r-- | Projects/Asteroids/asteroids.vcxproj.filters | 125 | ||||
| -rw-r--r-- | Projects/Asteroids/src/WinWrapper.cpp | 9 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroid_ps_d3d11.hlsl | 41 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroid_ps_diligent.hlsl | 72 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroid_vs.hlsl | 3 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.cpp | 61 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.h | 18 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_d3d11.h | 1 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_d3d12.h | 1 | ||||
| -rw-r--r-- | Projects/Asteroids/src/settings.h | 2 |
12 files changed, 158 insertions, 465 deletions
diff --git a/Projects/Asteroids/CMakeLists.txt b/Projects/Asteroids/CMakeLists.txt index 5922f01..4bb80c3 100644 --- a/Projects/Asteroids/CMakeLists.txt +++ b/Projects/Asteroids/CMakeLists.txt @@ -37,6 +37,7 @@ set(INCLUDE set(PIXEL_SHADERS src/asteroid_ps.hlsl src/asteroid_ps_d3d11.hlsl + src/asteroid_ps_diligent.hlsl src/font_ps.hlsl src/skybox_ps.hlsl src/sprite_ps.hlsl diff --git a/Projects/Asteroids/asteroids.vcxproj b/Projects/Asteroids/asteroids.vcxproj deleted file mode 100644 index 013e66b..0000000 --- a/Projects/Asteroids/asteroids.vcxproj +++ /dev/null @@ -1,289 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <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"> - <ProjectGuid>{176C9B9A-2E06-4AC5-B186-56C9280104E7}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> - <ProjectName>Asteroids</ProjectName> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\diligentcore\Shared\build\Windows\Win64d.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\diligentcore\Shared\build\Windows\Win64r.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <RunCodeAnalysis>false</RunCodeAnalysis> - <CustomBuildAfterTargets>Build</CustomBuildAfterTargets> - <CustomBuildBeforeTargets>FxCompile</CustomBuildBeforeTargets> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <RunCodeAnalysis>false</RunCodeAnalysis> - <CustomBuildAfterTargets>Build</CustomBuildAfterTargets> - <CustomBuildBeforeTargets>FxCompile</CustomBuildBeforeTargets> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PreprocessorDefinitions>WIN32;NOMINMAX;_CRT_SECURE_NO_WARNINGS;ENGINE_DLL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>SDK\Include;$(IntDir);..\..\diligentcore\Graphics\GraphicsEngine\interface;..\..\diligentcore\Graphics\GraphicsEngineD3D11\interface;..\..\diligentcore\Graphics\GraphicsEngineD3D12\interface;..\..\diligentcore\Graphics\GraphicsEngineOpenGl\interface;..\..\diligentcore\Graphics\GraphicsTools\include;..\..\diligentcore\Graphics\HLSL2GLSLConverterLib\interface;..\..\diligentcore\Platforms\interface;..\..\diligenttools\RenderScript\include;..\..\diligenttools\TextureLoader\interface;..\..\diligentcore\Common\interface;..\..\diligentcore\Common\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <Optimization>Disabled</Optimization> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <MinimalRebuild>false</MinimalRebuild> - <EnablePREfast>false</EnablePREfast> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - </ClCompile> - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <DelayLoadDLLs>d3d11.dll;d3d12.dll</DelayLoadDLLs> - <AdditionalDependencies>d3dcompiler.lib;d3d12.lib;d3d11.lib;dxgi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;winmm.lib;shcore.lib;ninput.lib;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>SDK\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Link> - <CustomBuildStep /> - <FxCompile> - <ShaderModel>5.0</ShaderModel> - <VariableName>g_%(Filename)</VariableName> - <HeaderFileOutput>$(IntDir)%(Filename).h</HeaderFileOutput> - <ObjectFileOutput /> - <EntryPointName>%(Filename)</EntryPointName> - </FxCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <PreprocessorDefinitions>WIN32;NOMINMAX;_CRT_SECURE_NO_WARNINGS;ENGINE_DLL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>SDK\Include;$(IntDir);..\..\diligentcore\Graphics\GraphicsEngine\interface;..\..\diligentcore\Graphics\GraphicsEngineD3D11\interface;..\..\diligentcore\Graphics\GraphicsEngineD3D12\interface;..\..\diligentcore\Graphics\GraphicsEngineOpenGl\interface;..\..\diligentcore\Graphics\GraphicsTools\include;..\..\diligentcore\Graphics\HLSL2GLSLConverterLib\interface;..\..\diligentcore\Platforms\interface;..\..\diligenttools\RenderScript\include;..\..\diligenttools\TextureLoader\interface;..\..\diligentcore\Common\interface;..\..\diligentcore\Common\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <WarningLevel>Level3</WarningLevel> - <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> - <MultiProcessorCompilation>true</MultiProcessorCompilation> - <EnablePREfast>false</EnablePREfast> - <PrecompiledHeader>NotUsing</PrecompiledHeader> - </ClCompile> - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <SubSystem>Console</SubSystem> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - <DelayLoadDLLs>d3d11.dll;d3d12.dll</DelayLoadDLLs> - <AdditionalDependencies>d3dcompiler.lib;d3d12.lib;d3d11.lib;dxgi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;winmm.lib;shcore.lib;ninput.lib;%(AdditionalDependencies)</AdditionalDependencies> - <AdditionalLibraryDirectories>SDK\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Link> - <CustomBuildStep /> - <FxCompile> - <ShaderModel>5.0</ShaderModel> - <VariableName>g_%(Filename)</VariableName> - <HeaderFileOutput>$(IntDir)%(Filename).h</HeaderFileOutput> - <ObjectFileOutput /> - <EntryPointName>%(Filename)</EntryPointName> - </FxCompile> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="src\asteroids_d3d11.cpp" /> - <ClCompile Include="src\asteroids_d3d12.cpp" /> - <ClCompile Include="src\asteroids_DE.cpp" /> - <ClCompile Include="src\camera.cpp" /> - <ClCompile Include="src\DDSTextureLoader.cpp" /> - <ClCompile Include="src\mesh.cpp" /> - <ClCompile Include="src\simplexnoise1234.c" /> - <ClCompile Include="src\simulation.cpp" /> - <ClCompile Include="src\texture.cpp" /> - <ClCompile Include="src\WinWrapper.cpp" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="src\asteroids_d3d11.h" /> - <ClInclude Include="src\asteroids_d3d12.h" /> - <ClInclude Include="src\asteroids_DE.h" /> - <ClInclude Include="src\camera.h" /> - <ClInclude Include="src\common_defines.h" /> - <ClInclude Include="src\dds.h" /> - <ClInclude Include="src\DDSTextureLoader.h" /> - <ClInclude Include="src\descriptor.h" /> - <ClInclude Include="src\font.h" /> - <ClInclude Include="src\gui.h" /> - <ClInclude Include="src\mesh.h" /> - <ClInclude Include="src\noise.h" /> - <ClInclude Include="src\settings.h" /> - <ClInclude Include="src\simplexnoise1234.h" /> - <ClInclude Include="src\simulation.h" /> - <ClInclude Include="src\sprite.h" /> - <ClInclude Include="src\subset_d3d12.h" /> - <ClInclude Include="src\texture.h" /> - <ClInclude Include="src\upload_heap.h" /> - <ClInclude Include="src\util.h" /> - </ItemGroup> - <ItemGroup> - <FxCompile Include="src\asteroid_ps.hlsl"> - <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.1</ShaderModel> - <ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.1</ShaderModel> - <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - </AdditionalOptions> - <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - </AdditionalOptions> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType> - </FxCompile> - <FxCompile Include="src\asteroid_ps_d3d11.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType> - </FxCompile> - <FxCompile Include="src\asteroid_vs.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType> - </FxCompile> - <FxCompile Include="src\font_ps.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType> - </FxCompile> - <FxCompile Include="src\skybox_ps.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType> - </FxCompile> - <FxCompile Include="src\skybox_vs.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType> - </FxCompile> - <FxCompile Include="src\sprite_ps.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType> - </FxCompile> - <FxCompile Include="src\sprite_vs.hlsl"> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType> - <ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType> - </FxCompile> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D11_64d.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D11_64r.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D12_64d.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D12_64r.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineOpenGL_64d.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineOpenGL_64r.dll"> - <FileType>Document</FileType> - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(RelativeDir)%(Filename).dll" "$(TargetDir)" -copy "%(RelativeDir)%(Filename).pdb" "$(TargetDir)"</Command> - <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying %(Filename).dll and %(Filename).pdb</Message> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)%(Filename).dll</Outputs> - </CustomBuild> - <None Include="README.md" /> - <None Include="src\intel_clear_bd_50_usascii.inl" /> - <None Include="src\stb_font_consolas_bold_50_usascii.inl" /> - </ItemGroup> - <ItemGroup> - <Image Include="directx11.dds" /> - <Image Include="directx12.dds" /> - <Image Include="starbox_1024.dds" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\diligentcore\Common\build\Win32\Common.vcxproj"> - <Project>{7380f7e6-315f-4b4e-92eb-e6aeee865298}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\External\glew\build\Win32\glew_static.vcxproj"> - <Project>{664e6f0d-6784-4760-9565-d54f8eb1edf4}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Graphics\GraphicsEngineD3D11\build\Win32\GraphicsEngineD3D11.vcxproj"> - <Project>{fe289cc7-15d6-4a76-b9cb-f61cab3192c9}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Graphics\GraphicsEngineD3D12\build\Win32\GraphicsEngineD3D12.vcxproj"> - <Project>{fff8071a-db82-485b-adc3-f0b675296869}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Graphics\GraphicsEngineOpenGL\build\Win32\GraphicsEngineOpenGL.vcxproj"> - <Project>{15e346d3-fde6-4b29-88b7-fca14dada501}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Graphics\GraphicsEngine\build\Win32\GraphicsEngine.vcxproj"> - <Project>{052dd700-477c-4512-a7f4-b05ebef5c80e}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Graphics\GraphicsTools\build\Win32\GraphicsTools.vcxproj"> - <Project>{c6014499-0cf2-43ec-a773-a4e354fb2d74}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Platforms\Basic\build\Win32\BasicPlatform.vcxproj"> - <Project>{8ada5f93-7a38-4ad8-b8f5-1ffd4d4f630c}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligentcore\Platforms\Win32\build\Win32\WindowsPlatform.vcxproj"> - <Project>{58f32677-436b-412a-bbf8-2b1310d82cd8}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\External\libjpeg-9a\build\Win32\libjpeg.vcxproj"> - <Project>{019dbd2a-273d-4ba4-bf86-b5efe2ed76b1}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\External\libtiff-4.0.3\build\Win32\LibTiff.vcxproj"> - <Project>{97d592a8-5afe-4e72-8da9-3c3ef98948b1}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\External\lpng-1.6.17\build\Win32\LibPng.vcxproj"> - <Project>{822f4b60-069a-4f54-a219-dd4562a254a1}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\External\lua-5.2.3\build\Win32\Lua.vcxproj"> - <Project>{3f7fed43-207a-4c2c-80c4-5965448d0706}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\External\zlib-1.2.8\build\Win32\zlib.vcxproj"> - <Project>{695c52b1-0267-4ded-bdf3-e7113756ff3f}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\RenderScript\build\Win32\RenderScript.vcxproj"> - <Project>{c8add3b4-e83b-458e-96c8-b278f22c2f04}</Project> - </ProjectReference> - <ProjectReference Include="..\..\diligenttools\TextureLoader\build\Win32\TextureLoader.vcxproj"> - <Project>{3de4fdb9-df4d-4b57-9ffe-616704d4fe2f}</Project> - </ProjectReference> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/Projects/Asteroids/asteroids.vcxproj.filters b/Projects/Asteroids/asteroids.vcxproj.filters deleted file mode 100644 index d9f7553..0000000 --- a/Projects/Asteroids/asteroids.vcxproj.filters +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <FxCompile Include="src\asteroid_vs.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\skybox_ps.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\skybox_vs.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\font_ps.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\sprite_vs.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\sprite_ps.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\asteroid_ps_d3d11.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - <FxCompile Include="src\asteroid_ps.hlsl"> - <Filter>Shaders</Filter> - </FxCompile> - </ItemGroup> - <ItemGroup> - <ClCompile Include="src\asteroids_d3d11.cpp" /> - <ClCompile Include="src\asteroids_d3d12.cpp" /> - <ClCompile Include="src\camera.cpp" /> - <ClCompile Include="src\DDSTextureLoader.cpp" /> - <ClCompile Include="src\mesh.cpp" /> - <ClCompile Include="src\simplexnoise1234.c" /> - <ClCompile Include="src\simulation.cpp" /> - <ClCompile Include="src\texture.cpp" /> - <ClCompile Include="src\WinWrapper.cpp" /> - <ClCompile Include="src\asteroids_DE.cpp" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="src\asteroids_d3d11.h" /> - <ClInclude Include="src\asteroids_d3d12.h" /> - <ClInclude Include="src\camera.h" /> - <ClInclude Include="src\dds.h" /> - <ClInclude Include="src\DDSTextureLoader.h" /> - <ClInclude Include="src\mesh.h" /> - <ClInclude Include="src\noise.h" /> - <ClInclude Include="src\simplexnoise1234.h" /> - <ClInclude Include="src\simulation.h" /> - <ClInclude Include="src\texture.h" /> - <ClInclude Include="src\util.h" /> - <ClInclude Include="src\settings.h" /> - <ClInclude Include="src\subset_d3d12.h" /> - <ClInclude Include="src\sprite.h"> - <Filter>GUI</Filter> - </ClInclude> - <ClInclude Include="src\gui.h"> - <Filter>GUI</Filter> - </ClInclude> - <ClInclude Include="src\font.h"> - <Filter>GUI</Filter> - </ClInclude> - <ClInclude Include="src\descriptor.h" /> - <ClInclude Include="src\upload_heap.h" /> - <ClInclude Include="src\common_defines.h"> - <Filter>Shaders</Filter> - </ClInclude> - <ClInclude Include="src\asteroids_DE.h" /> - </ItemGroup> - <ItemGroup> - <Filter Include="Shaders"> - <UniqueIdentifier>{8faf854c-ac25-4515-8f07-93a5c642b94b}</UniqueIdentifier> - </Filter> - <Filter Include="GUI"> - <UniqueIdentifier>{bfe3f052-dc47-42b1-b2ed-8a41a5f87110}</UniqueIdentifier> - </Filter> - <Filter Include="Media"> - <UniqueIdentifier>{c8998999-1e17-41eb-be05-0a68278ef143}</UniqueIdentifier> - </Filter> - <Filter Include="DLLs"> - <UniqueIdentifier>{4d8d1863-88b5-4e85-a233-a65f32f19b4c}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <None Include="src\intel_clear_bd_50_usascii.inl"> - <Filter>GUI</Filter> - </None> - <None Include="src\stb_font_consolas_bold_50_usascii.inl"> - <Filter>GUI</Filter> - </None> - <None Include="README.md" /> - </ItemGroup> - <ItemGroup> - <Image Include="directx11.dds"> - <Filter>Media</Filter> - </Image> - <Image Include="directx12.dds"> - <Filter>Media</Filter> - </Image> - <Image Include="starbox_1024.dds"> - <Filter>Media</Filter> - </Image> - </ItemGroup> - <ItemGroup> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D11_64d.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D11_64r.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D12_64d.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineD3D12_64r.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineOpenGL_64d.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - <CustomBuild Include="..\..\build\Win32\bin\DLLs\x64\GraphicsEngineOpenGL_64r.dll"> - <Filter>DLLs</Filter> - </CustomBuild> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/Projects/Asteroids/src/WinWrapper.cpp b/Projects/Asteroids/src/WinWrapper.cpp index e60480f..fd126b4 100644 --- a/Projects/Asteroids/src/WinWrapper.cpp +++ b/Projects/Asteroids/src/WinWrapper.cpp @@ -208,7 +208,7 @@ LRESULT CALLBACK WindowProc( return 0; case 'B': if (gSettings.mode == Settings::RenderMode::DiligentD3D12 || gSettings.mode == Settings::RenderMode::DiligentVulkan) { - gSettings.resourceBindingMode = (gSettings.resourceBindingMode + 1) % 3; + gSettings.resourceBindingMode = (gSettings.resourceBindingMode + 1) % 4; gUpdateWorkload = true; } return 0; @@ -602,9 +602,10 @@ int main(int argc, char** argv) gWorkloadDE->GetPerfCounters(updateTime, renderTime); switch (gSettings.resourceBindingMode) { - case 0: resBindModeStr = "-d";break; - case 1: resBindModeStr = "-m";break; - case 2: resBindModeStr = "-tm";break; + case 0: resBindModeStr = "-dyn";break; + case 1: resBindModeStr = "-mut";break; + case 2: resBindModeStr = "-tex_mut";break; + case 3: resBindModeStr = "-bindless";break; } break; } diff --git a/Projects/Asteroids/src/asteroid_ps_d3d11.hlsl b/Projects/Asteroids/src/asteroid_ps_d3d11.hlsl index 27fd72a..f4987c9 100644 --- a/Projects/Asteroids/src/asteroid_ps_d3d11.hlsl +++ b/Projects/Asteroids/src/asteroid_ps_d3d11.hlsl @@ -1,18 +1,11 @@ +#include "asteroid_vs.hlsl" #include "common_defines.h" -struct VSOut -{ - float3 positionModel : POSITIONMODEL; - float3 normalWorld : NORMAL; - float3 albedo : ALBEDO; // Alternatively, can pass just "ao" to PS and read cbuffer in PS -}; - -Texture2DArray<float4> Tex;// : register(t0); -SamplerState Tex_sampler;// : register(s0); +Texture2DArray<float4> Tex : register(t0); +sampler Sampler : register(s0); -void asteroid_ps_d3d11(in float4 position : SV_Position, - in VSOut vs_output, - out float4 color : SV_Target) +float4 asteroid_ps_d3d11(in float4 position : SV_Position, + VSOut input) : SV_Target { // Tweaking float3 lightPos = float3(0.5, -0.25, -1); @@ -20,11 +13,11 @@ void asteroid_ps_d3d11(in float4 position : SV_Position, bool applyLight = true; bool applyCoverage = true; - float3 normal = normalize(vs_output.normalWorld); + float3 normal = normalize(input.normalWorld); // Triplanar projection - float3 blendWeights = abs(normalize(vs_output.positionModel)); - float3 uvw = vs_output.positionModel * 0.5f + 0.5f; + float3 blendWeights = abs(normalize(input.positionModel)); + float3 uvw = input.positionModel * 0.5f + 0.5f; // Tighten up the blending zone blendWeights = saturate((blendWeights - 0.2f) * 7.0f); blendWeights /= (blendWeights.x + blendWeights.y + blendWeights.z).xxx; @@ -36,10 +29,10 @@ void asteroid_ps_d3d11(in float4 position : SV_Position, // TODO: Should really branch out zero'd weight ones, but FXC is being a pain // and forward substituting the above and then refusing to compile "divergent" // coordinates... - float3 detailTex = float3(0.0, 0.0, 0.0); - detailTex += blendWeights.x * Tex.Sample(Tex_sampler, coords1).xyz; - detailTex += blendWeights.y * Tex.Sample(Tex_sampler, coords2).xyz; - detailTex += blendWeights.z * Tex.Sample(Tex_sampler, coords3).xyz; + float3 detailTex = 0.0f; + detailTex += blendWeights.x * Tex.Sample(Sampler, coords1).xyz; + detailTex += blendWeights.y * Tex.Sample(Sampler, coords2).xyz; + detailTex += blendWeights.z * Tex.Sample(Sampler, coords3).xyz; float wrap = 0.0f; float wrap_diffuse = saturate((dot(normal, normalize(lightPos)) + wrap) / (1.0f + wrap)); @@ -48,9 +41,9 @@ void asteroid_ps_d3d11(in float4 position : SV_Position, // Approximate partial coverage on distant asteroids (by fading them out) float coverage = saturate(position.z * 4000.0f); - color.rgb = vs_output.albedo.rgb; - [flatten] if (applyNoise) color.rgb = color.rgb * (2.0f * detailTex); - [flatten] if (applyLight) color.rgb = color.rgb * light; - [flatten] if (applyCoverage) color.rgb = color.rgb * coverage; - color.a = 1.0; + float3 color = input.albedo; + [flatten] if (applyNoise) color = color * (2.0f * detailTex); + [flatten] if (applyLight) color = color * light; + [flatten] if (applyCoverage) color = color * coverage; + return float4(color, 1.0f); } diff --git a/Projects/Asteroids/src/asteroid_ps_diligent.hlsl b/Projects/Asteroids/src/asteroid_ps_diligent.hlsl new file mode 100644 index 0000000..c2f6f0b --- /dev/null +++ b/Projects/Asteroids/src/asteroid_ps_diligent.hlsl @@ -0,0 +1,72 @@ +#include "common_defines.h" + +struct VSOut +{ + float3 positionModel : POSITIONMODEL; + float3 normalWorld : NORMAL; + float3 albedo : ALBEDO; // Alternatively, can pass just "ao" to PS and read cbuffer in PS + uint textureId : TEXTURE_ID; +}; + +#ifdef BINDLESS + +Texture2DArray<float4> Tex[NUM_UNIQUE_TEXTURES]; +SamplerState Tex_sampler; + +#else + +Texture2DArray<float4> Tex; +SamplerState Tex_sampler; + +#endif + +void asteroid_ps_diligent(in float4 position : SV_Position, + in VSOut vs_output, + out float4 color : SV_Target) +{ + // Tweaking + float3 lightPos = float3(0.5, -0.25, -1); + bool applyNoise = true; + bool applyLight = true; + bool applyCoverage = true; + + float3 normal = normalize(vs_output.normalWorld); + + // Triplanar projection + float3 blendWeights = abs(normalize(vs_output.positionModel)); + float3 uvw = vs_output.positionModel * 0.5f + 0.5f; + // Tighten up the blending zone + blendWeights = saturate((blendWeights - 0.2f) * 7.0f); + blendWeights /= (blendWeights.x + blendWeights.y + blendWeights.z).xxx; + + float3 coords1 = float3(uvw.yz, 0); + float3 coords2 = float3(uvw.zx, 1); + float3 coords3 = float3(uvw.xy, 2); + + // TODO: Should really branch out zero'd weight ones, but FXC is being a pain + // and forward substituting the above and then refusing to compile "divergent" + // coordinates... + float3 detailTex = float3(0.0, 0.0, 0.0); +#ifdef BINDLESS + detailTex += blendWeights.x * Tex[vs_output.textureId].Sample(Tex_sampler, coords1).xyz; + detailTex += blendWeights.y * Tex[vs_output.textureId].Sample(Tex_sampler, coords2).xyz; + detailTex += blendWeights.z * Tex[vs_output.textureId].Sample(Tex_sampler, coords3).xyz; +#else + detailTex += blendWeights.x * Tex.Sample(Tex_sampler, coords1).xyz; + detailTex += blendWeights.y * Tex.Sample(Tex_sampler, coords2).xyz; + detailTex += blendWeights.z * Tex.Sample(Tex_sampler, coords3).xyz; +#endif + + float wrap = 0.0f; + float wrap_diffuse = saturate((dot(normal, normalize(lightPos)) + wrap) / (1.0f + wrap)); + float light = 3.0f * wrap_diffuse + 0.06f; + + // Approximate partial coverage on distant asteroids (by fading them out) + float coverage = saturate(position.z * 4000.0f); + + color.rgb = vs_output.albedo.rgb; + [flatten] if (applyNoise) color.rgb = color.rgb * (2.0f * detailTex); + [flatten] if (applyLight) color.rgb = color.rgb * light; + [flatten] if (applyCoverage) color.rgb = color.rgb * coverage; + color.a = 1.0; +} diff --git a/Projects/Asteroids/src/asteroid_vs.hlsl b/Projects/Asteroids/src/asteroid_vs.hlsl index 772137c..f19fe2c 100644 --- a/Projects/Asteroids/src/asteroid_vs.hlsl +++ b/Projects/Asteroids/src/asteroid_vs.hlsl @@ -12,6 +12,7 @@ struct VSOut float3 positionModel : POSITIONMODEL; float3 normalWorld : NORMAL; float3 albedo : ALBEDO; // Alternatively, can pass just "ao" to PS and read cbuffer in PS + uint textureId : TEXTURE_ID; }; float linstep(float min, float max, float s) @@ -33,4 +34,6 @@ void asteroid_vs(in float3 in_pos : ATTRIB0, float depth = linstep(0.5f, 0.7f, length(in_pos.xyz)); vs_output.albedo = lerp(mDeepColor.xyz, mSurfaceColor.xyz, depth); + + vs_output.textureId = mTextureIndex; } diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp index 240287f..3cafba9 100644 --- a/Projects/Asteroids/src/asteroids_DE.cpp +++ b/Projects/Asteroids/src/asteroids_DE.cpp @@ -73,6 +73,23 @@ namespace Diligent namespace AsteroidsDE { +struct DrawConstantBuffer { + DirectX::XMFLOAT4X4 mWorld; + DirectX::XMFLOAT4X4 mViewProjection; + DirectX::XMFLOAT3 mSurfaceColor; + float unused0; + + DirectX::XMFLOAT3 mDeepColor; + float unused1; + + Uint32 mTextureIndex; + Uint32 unused3[3]; +}; + +struct SkyboxConstantBuffer { + DirectX::XMFLOAT4X4 mViewProjection; +}; + // Create Direct3D device and swap chain void Asteroids::InitDevice(HWND hWnd, DeviceType DevType) @@ -190,10 +207,12 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G mNumSubsets = std::max(settings.numThreads,1); mNumSubsets = std::min(settings.numThreads,32); + InitDevice(hWnd, DevType); + m_BindingMode = static_cast<BindingMode>(settings.resourceBindingMode); + if (m_BindingMode == BindingMode::Bindless && !mDevice->GetDeviceCaps().bBindlessSupported) + m_BindingMode = BindingMode::TextureMutable; - InitDevice(hWnd, DevType); - mCmdLists.resize(mDeferredCtxt.size()); mWorkerThreads.resize(mNumSubsets-1); for(auto &thread : mWorkerThreads) @@ -261,12 +280,23 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G ShaderCreateInfo attribs; attribs.Desc.ShaderType = SHADER_TYPE_PIXEL; attribs.Desc.Name = "Asteroids PS"; - attribs.EntryPoint = "asteroid_ps_d3d11"; - attribs.FilePath = "asteroid_ps_d3d11.hlsl"; + attribs.EntryPoint = "asteroid_ps_diligent"; + attribs.FilePath = "asteroid_ps_diligent.hlsl"; attribs.pShaderSourceStreamFactory = pShaderSourceFactory; attribs.UseCombinedTextureSamplers = true; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; - mDevice->CreateShader(attribs, &ps); + + if(m_BindingMode == BindingMode::Bindless) + { + ShaderMacro Macros[] = {{"BINDLESS", "1"}, {}}; + attribs.Macros = Macros; + mDevice->CreateShader(attribs, &ps); + attribs.Macros = nullptr; + } + else + { + mDevice->CreateShader(attribs, &ps); + } } StaticSamplerDesc samDesc; @@ -318,6 +348,10 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G PSODesc.SRBAllocationGranularity = NUM_UNIQUE_TEXTURES; NumSRBs = NUM_UNIQUE_TEXTURES; } + else if(m_BindingMode == BindingMode::Bindless) + { + NumSRBs = 1; + } mDevice->CreatePipelineState(PSODesc, &mAsteroidsPSO); mAsteroidsPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "DrawConstantBuffer")->Set(mDrawConstantBuffer); @@ -525,6 +559,13 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G mAsteroidsSRBs[srb]->GetVariableByName(SHADER_TYPE_PIXEL, "Tex")->Set(mTextureSRVs[srb]); } } + else if( m_BindingMode == BindingMode::Bindless ) + { + IDeviceObject* SRVArray[NUM_UNIQUE_TEXTURES]; + for(Uint32 t = 0; t < NUM_UNIQUE_TEXTURES; ++t) + SRVArray[t] = mTextureSRVs[t]; + mAsteroidsSRBs[0]->GetVariableByName(SHADER_TYPE_PIXEL, "Tex")->SetArray(SRVArray, 0, NUM_UNIQUE_TEXTURES); + } mDeviceCtxt->TransitionResourceStates(static_cast<Uint32>(Barriers.size()), Barriers.data()); } @@ -756,6 +797,11 @@ void Asteroids::RenderSubset(Diligent::Uint32 SubsetNum, } auto pVar = m_BindingMode == BindingMode::Dynamic ? mAsteroidsSRBs[SubsetNum]->GetVariableByName(SHADER_TYPE_PIXEL, "Tex") : nullptr; + if( m_BindingMode == BindingMode::Bindless) + { + pCtx->CommitShaderResources(mAsteroidsSRBs[0], RESOURCE_STATE_TRANSITION_MODE_VERIFY); + } + auto viewProjection = camera.ViewProjection(); for (UINT drawIdx = startIdx; drawIdx < startIdx+numAsteroids; ++drawIdx) { @@ -768,15 +814,16 @@ void Asteroids::RenderSubset(Diligent::Uint32 SubsetNum, XMStoreFloat4x4(&drawConstants->mViewProjection, viewProjection); drawConstants->mSurfaceColor = staticData->surfaceColor; drawConstants->mDeepColor = staticData->deepColor; + drawConstants->mTextureIndex = staticData->textureIndex; } if( m_BindingMode == BindingMode::Dynamic ) { pVar->Set(mTextureSRVs[staticData->textureIndex]); - pCtx->CommitShaderResources(mAsteroidsSRBs[SubsetNum], RESOURCE_STATE_TRANSITION_MODE_TRANSITION); + pCtx->CommitShaderResources(mAsteroidsSRBs[SubsetNum], RESOURCE_STATE_TRANSITION_MODE_VERIFY); } else if( m_BindingMode == BindingMode::Mutable ) { - pCtx->CommitShaderResources(mAsteroidsSRBs[drawIdx], RESOURCE_STATE_TRANSITION_MODE_TRANSITION); + pCtx->CommitShaderResources(mAsteroidsSRBs[drawIdx], RESOURCE_STATE_TRANSITION_MODE_VERIFY); } else if( m_BindingMode == BindingMode::TextureMutable ) { diff --git a/Projects/Asteroids/src/asteroids_DE.h b/Projects/Asteroids/src/asteroids_DE.h index 4029cc3..60a56cc 100644 --- a/Projects/Asteroids/src/asteroids_DE.h +++ b/Projects/Asteroids/src/asteroids_DE.h @@ -28,19 +28,6 @@ namespace AsteroidsDE { -struct DrawConstantBuffer { - DirectX::XMFLOAT4X4 mWorld; - DirectX::XMFLOAT4X4 mViewProjection; - DirectX::XMFLOAT3 mSurfaceColor; - float unused0; - DirectX::XMFLOAT3 mDeepColor; - float unused1; -}; - -struct SkyboxConstantBuffer { - DirectX::XMFLOAT4X4 mViewProjection; -}; - class Asteroids { public: Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, GUI* gui, HWND hWnd, Diligent::DeviceType DevType); @@ -62,8 +49,9 @@ private: enum class BindingMode { Dynamic = 0, - Mutable = 1, - TextureMutable = 2 + Mutable, + TextureMutable, + Bindless }m_BindingMode = BindingMode::TextureMutable; AsteroidsSimulation* mAsteroids = nullptr; diff --git a/Projects/Asteroids/src/asteroids_d3d11.h b/Projects/Asteroids/src/asteroids_d3d11.h index da9548e..8d672a9 100644 --- a/Projects/Asteroids/src/asteroids_d3d11.h +++ b/Projects/Asteroids/src/asteroids_d3d11.h @@ -31,6 +31,7 @@ struct DrawConstantBuffer { float unused0; DirectX::XMFLOAT3 mDeepColor; float unused1; + UINT unused2[4]; }; struct SkyboxConstantBuffer { diff --git a/Projects/Asteroids/src/asteroids_d3d12.h b/Projects/Asteroids/src/asteroids_d3d12.h index 3021d28..fb2297b 100644 --- a/Projects/Asteroids/src/asteroids_d3d12.h +++ b/Projects/Asteroids/src/asteroids_d3d12.h @@ -37,6 +37,7 @@ CBUFFER_ALIGN struct DrawConstantBuffer { DirectX::XMFLOAT3 mDeepColor; float unused1; UINT mTextureIndex; + UINT unused2[3]; }; CBUFFER_ALIGN struct SkyboxConstantBuffer { diff --git a/Projects/Asteroids/src/settings.h b/Projects/Asteroids/src/settings.h index ea7e146..08f0a40 100644 --- a/Projects/Asteroids/src/settings.h +++ b/Projects/Asteroids/src/settings.h @@ -77,7 +77,7 @@ struct Settings DiligentVulkan }mode = DiligentD3D11; - int resourceBindingMode = 2; // Only for DiligentD3D12 mode + int resourceBindingMode = 3; // Only for DiligentD3D12 and DiligentVk modes bool lockFrameRate = false; bool animate = true; |
