2
0
Эх сурвалжийг харах

More wiki items and menu/tocc

JornosDekstop 2 жил өмнө
parent
commit
8aeb8a71b1

+ 6 - 0
en/contributors/engine/hot-reloading-shaders.md

@@ -0,0 +1,6 @@
+# Hot Reloading Engine Shaders in Editor
+GameStudio automatically reloads project shaders on every file change, it can also reload engine shaders but the files the engine is looking at to synchronize those changes are located inside of the nuget packages ``C:\Users\[USERNAME]\.nuget\packages\stride.rendering\4.1.0.1-beta\stride\Assets\Shadows\ShadowMapCommon.sdsl`` for example.
+
+If you still can't find where it's looking for with a specific file you can put a conditional breakpoint on [the directoryWatcher.Track line](https://github.com/stride3d/stride/blob/master/sources/engine/Stride.Rendering/Rendering/EffectSystem.cs#L232) with an expression like ``filePath.Contains("NameOfYourShader")`` and your IDE will break whenever that file is tracked, you can then inspect the value for `filePath` in your IDE/debugger's locals and it'll contain the full path to that file.
+
+Don't forget to apply back the changes you made to the files in the nuget package to the files in your repo.

+ 8 - 0
en/contributors/engine/index.md

@@ -14,6 +14,14 @@ Building the Stride engine locally on Linux
 Learn how manage translations for the engine.
 
 
+### [Hot reloading shaders](hot-reloading-shaders.md)
+Learn about hot reloading shaders
+
+### [Source debugging](source-debugging.md)
+Learn how to do source debugging
+
+### [Visual studio plugin](visual-studio-plugin.md)
+Learn about the Visual studio plugin for shader development
 
 # Architecture 🧬
 ### [Build pipeline](architecture/build-pipeline.md)

+ 26 - 0
en/contributors/engine/source-debugging.md

@@ -0,0 +1,26 @@
+#Setting Up Source Debugging in VS
+First, make sure source debugging external dependencies is enabled:
+
+* Make sure ["Debug Just My Code" is disabled](https://docs.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2019), in Tools -> Options -> Debugging.
+
+
+Stride builds the PDB files right into the normal `.nupkg` files. When debugging a public release, SourceLink should cause Visual Studio to download source files right from github when stepping into them.
+
+Because of the way Visual Studio tracks down source files while stepping, [one can't Goto-Definition for types in dependencies in VS Community](https://stackoverflow.com/questions/13203346/go-to-definition-in-visual-studio-only-brings-up-the-metadata-for-non-project). The workaround is to first step into the dependency to get the source loaded. Alternatively, one can pay for .NET Reflector, VSPro, or Resharper, which fix this in Visual Studio.
+
+* [Set symbol (.pdb) and source files in the debugger - Visual Studio | Microsoft Docs](https://docs.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2019)
+
+
+One day it might be nice to support `.snupkg` or `.source.nupkg` files, so the base packages could be smaller. However, it's not a big deal.
+* [Creating SourceLens symbol packages](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg)
+* [Source Link and .NET libraries | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink)
+* [How to Debug a .NET Core NuGet Package](https://geeklearning.io/how-to-debug-a-net-core-nuget-package/)
+
+
+
+## Related Discussions
+- https://github.com/stride3d/stride/discussions/1116
+
+
+
+

+ 23 - 0
en/contributors/engine/visual-studio-plugin.md

@@ -0,0 +1,23 @@
+The Stride Visual Studio Plugin adds:
+* syntax highlighting for Stride `.sdsl` shaders  (formerly `.xlsl`)
+* generates shader key files (`.sdsl.cs`) which create type definitions and ParameterKey values for the shader parameters
+* generates shader effect files (`.sdfx.cs`)
+
+Whenever you edit a shader file, the plug-in recompiles the C# key and effect files, so your C# code can reference elements necessary for your shader.
+
+The code generation happens by looking at your game version
+loading the Shader Compiler dependency in the game build, and running the shader compiler.
+
+
+The Visual Studio Plugin Code lives in: https://github.com/stride3d/stride/tree/master/sources/tools/Stride.VisualStudio.Package
+
+
+Install the Stride Visual Studio extension by using the button in the Stride Launcher:
+
+<img src="../media/visualstudio-plugin.jpg" alt="Stride.Core methods">
+
+You can check that the Stride Visual Studio plugin is installed in Visual Studio by going to Extensions-> Manage Extensions, and looking for the Stride Extension.
+
+<img src="../media/vsplugin-manage-extensions.jpg" alt="Stride.Core methods">
+
+<img src="../media/vsplugin-install.jpg" alt="Stride.Core methods">

+ 3 - 0
en/contributors/media/visualstudio-plugin.jpg

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6dcd0eec6fcf8e1225553000eecfe6522189c03d9fcd7343c5e6cbf4db9f7f2
+size 45427

+ 3 - 0
en/contributors/media/vsplugin-install.jpg

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0862668d4b6e1c24b2f3ece91d564f12cc5035090641c67e383374817f1a883
+size 25362

+ 3 - 0
en/contributors/media/vsplugin-manage-extensions.jpg

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0ac6b0bb3b3162a4dff1a6955a5b9737ee064dd92969b907a66349ce919b80c5
+size 18926

+ 18 - 0
en/contributors/toc.yml

@@ -14,6 +14,12 @@
     href: engine/building-source-linux.md
   - name: Localization
     href: engine/localization.md
+  - name: Hot reloading editor shaders
+    href: engine/hot-reloading-shaders.md
+  - name: Source debugging
+    href: engine/source-debugging.md
+  - name: Visual Studio plugin
+    href: engine/visual-studio-plugin.md
   - name: 🧬️ Architecture
     expanded: false
     href: engine/architecture/index.md
@@ -28,3 +34,15 @@
       href: engine/architecture/dependency-graph.md
     - name: Asset introspection
       href: engine/architecture/build-pipeline.md
+- name: ℹ Contribute to the documentation
+  expanded: false
+  href: documentation/index.md
+  items:
+  - name: Adding a new manual page
+    href: documentation/adding-manual-page.md
+- name: 🌐️ Contribute to the website
+  expanded: false
+  href: website/index.md
+  items:
+    - name: Adding a new blogpost
+      href: website/adding-blogpost.md