You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/ShaderBox_KevinLoddewykx.tex
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -177,13 +177,13 @@ \section{ShaderBox}
177
177
178
178
\newpage
179
179
\subsection{Planning}
180
-
Currently I am working on \textbf{rewriting} how the \textbf{3D viewport} is hooked up with the user interface. At the moment it is using the \href{https://github.com/Microsoft/WPFDXInterop}{WPF DirectX Extensions} project from Microsoft, which allows you to render with DirectX 11 to a image hosted inside WPF. The problem with this approach is that WPF handles internally when a new frame needs to be rendered and you need to use a Flush call on the DeviceContext to have the content appear, which is a non-blocking call and causes flickering. Also all the input needs to be captured inside the WPF application and manually send to the engine and the rendering needs to run on the UI thread.
180
+
Currently I am working on creating a UI design document. Describing the future UI layout, taking into account al the planned and backlogged feautures and extensibility.
181
181
\par
182
182
Planned
183
183
\begin{itemize}[noitemsep]
184
184
\item Docking manager + multiple text editors
185
185
\item Improve integration of HlslTools: folding, code completion, ...
186
-
\item C++/CLI project instead of marshalling
186
+
\item C++/CLI project instead of marshalling for ShaderCompiler
187
187
\end{itemize}
188
188
189
189
Backlogged
@@ -205,7 +205,7 @@ \subsection{Planning}
205
205
\subsection{Workings}
206
206
When creating a new shader you can choose which type of shader you want to make, the passes it will need, the topology and set up the rasterizer. Afterwards Shader Box will initialize a new shader project with for each choosen pass a file. The user can always add extra header files which can be used locally so only the project can access it, or set it as a shared header so all the projects can include it. There is one built-in shared header which includes the samplerstates which the engine supports, two cbuffers one for the camera information which changes every frame and one for the per object information (currently only one object per scene). And a reserved slot for a texture, for when creating a post processing shader.
207
207
\par
208
-
After writing your shader you can click compile or build. Compile will only compile the active shader pass and output the found errors, while build will compile the entire project to precompiled shader files and create a properties panel, for controlling the parameters. The look of the properties panel can be controlled by metadata, using the same syntax as in FX Composer. Finding all this information is done by calling the SyntaxFactory.ParseSyntaxTree(...) method of HLSL Tools on each pass seperatly while passing the shader content. Next Shader Box will go over each SyntaxTree and extract the necessary data for creating the properties, for each found cbuffer a byte array is created which stores the settings which needs to be passed to the GPU. Every variable gets a offset to where it value needs to be stored in the array, in conformance with the HLSL packing needs. Every time the user updates a variable this byte array, which is defined in C\#, gets marshalled to the C++ engine.
208
+
After writing your shader you can click compile or build. Compile will only compile the active shader pass and output the found errors, while build will compile the entire project to precompiled shader files and create a properties panel, for controlling the parameters. The look of the properties panel can be controlled by metadata, using the same syntax as in FX Composer. Finding all this information is done by calling the SyntaxFactory.ParseSyntaxTree(...) method of HLSL Tools on each pass seperatly while passing the shader content. Next Shader Box will go over each SyntaxTree and extract the necessary data for creating the properties, for each found cbuffer a byte array is created which stores the settings which needs to be passed to the GPU. Every variable gets a offset to where it value needs to be stored in the array, in conformance with the HLSL packing needs. Every time the user updates a variable this byte array, which is defined in C\#, goes through a C++/CLI project to the C++ engine.
209
209
210
210
\newpage
211
211
\subsection{Tab: Library}\label{subsec:tab_l}
@@ -248,7 +248,9 @@ \subsection{Sub window: New shader}\label{subsec:tab_d}
248
248
\begin{itemize}
249
249
\item Post processing
250
250
\end{itemize}
251
-
When you want to write a Post processing effect, requires a vertex shader and pixel shader, the other shader types are disabled.
251
+
When you want to write a Post processing effect, only pixel shader is required and the other shader types are disabled.
252
+
\par
253
+
A vertex shader is not required, due to the engine providing this. The engine internally uses a vertex shader utilizing the Fullscreen Triangle Optimization.
0 commit comments