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: articles/content_pipeline/custom_effects.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -47,23 +47,23 @@ These are some tips for writing or converting effects for use with MonoGame.
47
47
48
48
| The supported shader models when targeting DX are the following:|
49
49
|---|
50
-
|* `vs_4_0_level_9_1` and `ps_4_0_level_9_1`|
51
-
|* `vs_4_0_level_9_3` and `ps_4_0_level_9_3`|
52
-
|* `vs_4_0` and `ps_4_0` (requires `HiDef``GraphicsProfile` at runtime)|
53
-
|* `vs_4_1` and `ps_4_1` (requires `HiDef``GraphicsProfile` at runtime)|
54
-
|* `vs_5_0` and `ps_5_0` (requires `HiDef``GraphicsProfile` at runtime)|
55
-
---
50
+
|`vs_4_0_level_9_1` and `ps_4_0_level_9_1`|
51
+
|`vs_4_0_level_9_3` and `ps_4_0_level_9_3`|
52
+
|`vs_4_0` and `ps_4_0` (requires `HiDef``GraphicsProfile` at runtime)|
53
+
|`vs_4_1` and `ps_4_1` (requires `HiDef``GraphicsProfile` at runtime)|
54
+
|`vs_5_0` and `ps_5_0` (requires `HiDef``GraphicsProfile` at runtime)|
55
+
56
56
|When targeting GL platforms we automatically translate FX files to GLSL using a library called [MojoShader](http://icculus.org/mojoshader/). The supported feature levels are the following:|
57
57
|---|
58
-
|* `vs_2_0` and `ps_2_0`|
59
-
|* `vs_3_0` and `ps_3_0`|
60
-
---
58
+
|`vs_2_0` and `ps_2_0`|
59
+
|`vs_3_0` and `ps_3_0`|
60
+
61
61
|You can use preprocessor checks to add conditional code or compilation depending on defined symbols. MonoGame defines the following symbols when compiling effects:|
62
62
|---|
63
-
|* `2MGFX`|
64
-
|* `HLSL` and `SM4` for DirectX |
65
-
|* `OpenGL` and `GLSL` for OpenGL |
66
-
---
63
+
|`2MGFX`|
64
+
|`HLSL` and `SM4` for DirectX |
65
+
|`OpenGL` and `GLSL` for OpenGL |
66
+
67
67
68
68
As an example, you can conditionally set shader models depending on the platform with the following code:
0 commit comments