User Tools

Site Tools


tutorial_203_20-_20shaders_20and_20effect_20system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
tutorial_203_20-_20shaders_20and_20effect_20system [2018/03/31 13:19]
127.0.0.1 external edit
tutorial_203_20-_20shaders_20and_20effect_20system [2018/04/13 22:33]
richardrussell Added syntax highlighting
Line 25: Line 25:
 \\  \\ 
 ===== Creating the Shaders ===== ===== Creating the Shaders =====
-\\  In the application code, we will need to create a vertex shader object and a pixel shader object. The code is demonstrated below:\\ \\ +\\  In the application code, we will need to create a vertex shader object and a pixel shader object. The code is demonstrated below: 
 + 
 +<code bb4w>
         REM Compile the vertex shader:         REM Compile the vertex shader:
         hr% = FN_CompileShaderFromFile(@dir$+"​Tutorial02.fx",​ "​VS",​ "​vs_4_0",​ ^pVSBlob%)         hr% = FN_CompileShaderFromFile(@dir$+"​Tutorial02.fx",​ "​VS",​ "​vs_4_0",​ ^pVSBlob%)
Line 40: Line 42:
           ERROR 100, "​ID3D11Device::​CreateVertexShader failed: "​+STR$~hr%           ERROR 100, "​ID3D11Device::​CreateVertexShader failed: "​+STR$~hr%
         ENDIF         ENDIF
-\\ + 
         REM Compile the pixel shader:         REM Compile the pixel shader:
         hr% = FN_CompileShaderFromFile(@dir$+"​Tutorial02.fx",​ "​PS",​ "​ps_4_0",​ ^pPSBlob%)         hr% = FN_CompileShaderFromFile(@dir$+"​Tutorial02.fx",​ "​PS",​ "​ps_4_0",​ ^pPSBlob%)
Line 55: Line 57:
           ERROR 100, "​ID3D11Device::​CreatePixelShader failed: "​+STR$~hr%           ERROR 100, "​ID3D11Device::​CreatePixelShader failed: "​+STR$~hr%
         ENDIF         ENDIF
-\\ +</​code>​ 
 ===== Putting It Together ===== ===== Putting It Together =====
 \\  After walking through the graphics pipeline, we can start to understand the process of rendering the triangle we created at the beginning of Tutorial 2. Creating Direct3D applications requires two distinct steps. The first would be creating the source data in vertex data, as we've done in Tutorial 2. The second stage would be to create the shaders which would transform that data for rendering, which we showed in this tutorial. \\  After walking through the graphics pipeline, we can start to understand the process of rendering the triangle we created at the beginning of Tutorial 2. Creating Direct3D applications requires two distinct steps. The first would be creating the source data in vertex data, as we've done in Tutorial 2. The second stage would be to create the shaders which would transform that data for rendering, which we showed in this tutorial.
tutorial_203_20-_20shaders_20and_20effect_20system.txt · Last modified: 2018/04/17 19:09 by tbest3112