-
-
Notifications
You must be signed in to change notification settings - Fork 201
Converting from Nu with OpenGL to Nu with Vulkan
We have rewritten all of our renderers from OpenGL to Vulkan. Currently this change exists on the vulkan branch and will be merged into master. Due to the number of changes involved, there will be some effort required on behalf of users to make existing projects work with the Vulkan update for Nu. Primarily, this falls into up to 5 tasks -
-
Run the appropriate
PropagateDefaultAssetsscript in the repository's root folder to update your default assets to those required for use by Vulkan. -
The
Nu.slnfile has been replaced with the newNu.slnxfile, which has a quite different format. When you created your project with Gaia, it automatically inserted the project details into your Nu.sln file. So upon upgrading to Nu with Vulkan, you will need to re-add your project to the newNu.slnxfile. -
You projects'
AssetGraph.nuagfile will need to have some of content's file types updated, specifically to includevertandfragfiles like so -
[[Default
[[Assets Assets/Default [bmp png psd ttf] [PsdToPng] [Render2d]]
[Assets Assets/Default [jpg jpeg tga tif tiff dds ktx] [BlockCompress] [Render3d]]
[Assets Assets/Default [cbm fbx gltf glb dae obj mtl raw] [] [Render3d]]
[Assets Assets/Default [wav ogg mp3] [] [Audio]]
[Assets Assets/Default [cur] [] [Cursor]]
[Assets Assets/Default [nueffect nuscript csv] [] [Symbol]]
[Assets Assets/Default [nuentity nugroup tsx tmx nav nbrd vert frag bin] [] []]]]
...
Optionally, you can remove the glsl file type as shown above as well since it's no longer used.
Additionally, you can remove the skel, json, and atlas file types as they are for Spine 2D, which is no longer supported in Nu with Vulkan.
- Remove everything that is now redundant in your
.fsprojproject file. The only things that should remain are the following entries like so -
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<Import Project="../../Nu/Nu.targets" />
<ItemGroup>
<None Include="Assets\*" />
<None Include="Assets\*\*" />
<Compile Include="Assets.fs" />
<Compile Include="Simulants.fs" />
<Compile Include="Gameplay.fs" />
<Compile Include="MyGame.fs" />
<Compile Include="MyGamePlugin.fs" />
<Compile Include="Program.fs" />
<None Include="AssetGraph.nuag" />
<None Include="Overlayer.nuol" />
<None Include="App.config" />
</ItemGroup>
</Project>You can use the template projects as a reference as to what to take out from your project's .fsproj file -
- If you have a
LightingConfig3dDispatcherin any of your scene files, they will be missing some values upon loading. You can either delete the dispatcher and restart the scene and create a new one (which will have all its values defaulted) or find the missing values that are zero'd out instead of being the default value and change them to either the default value or tune them to your liking.