diff --git a/.gitignore b/.gitignore
index 7a6e6d2c..976b5c10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,5 @@ monodroid*.msi
/CompiledContent/OSX/IgnoreMe.dll
/CompiledContent/Windows8/IgnoreMe.dll
/CompiledContent/Windows/IgnoreMe.dll
+*.cachefile
+*.dll
diff --git a/CompiledContent/Android/Content/Effects/BloomCombine.xnb b/CompiledContent/Android/Content/Effects/BloomCombine.xnb
index 028f9aa0..3b851259 100644
Binary files a/CompiledContent/Android/Content/Effects/BloomCombine.xnb and b/CompiledContent/Android/Content/Effects/BloomCombine.xnb differ
diff --git a/CompiledContent/Android/Content/Effects/BloomExtract.xnb b/CompiledContent/Android/Content/Effects/BloomExtract.xnb
index 6fcd66f6..8dd0ecb9 100644
Binary files a/CompiledContent/Android/Content/Effects/BloomExtract.xnb and b/CompiledContent/Android/Content/Effects/BloomExtract.xnb differ
diff --git a/CompiledContent/Android/Content/Effects/GaussianBlur.xnb b/CompiledContent/Android/Content/Effects/GaussianBlur.xnb
index 2725f06c..ce80cb4f 100644
Binary files a/CompiledContent/Android/Content/Effects/GaussianBlur.xnb and b/CompiledContent/Android/Content/Effects/GaussianBlur.xnb differ
diff --git a/CompiledContent/Android/Content/Effects/ParticleEffect.xnb b/CompiledContent/Android/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..8fee9635
Binary files /dev/null and b/CompiledContent/Android/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/Android/Content/Music/One Step Beyond.wma b/CompiledContent/Android/Content/Music/One Step Beyond.wma
index a1ac86d2..2e4fada2 100644
Binary files a/CompiledContent/Android/Content/Music/One Step Beyond.wma and b/CompiledContent/Android/Content/Music/One Step Beyond.wma differ
diff --git a/CompiledContent/Linux/Content/Effects/BloomCombine.xnb b/CompiledContent/Linux/Content/Effects/BloomCombine.xnb
index 028f9aa0..3b851259 100644
Binary files a/CompiledContent/Linux/Content/Effects/BloomCombine.xnb and b/CompiledContent/Linux/Content/Effects/BloomCombine.xnb differ
diff --git a/CompiledContent/Linux/Content/Effects/BloomExtract.xnb b/CompiledContent/Linux/Content/Effects/BloomExtract.xnb
index 6fcd66f6..8dd0ecb9 100644
Binary files a/CompiledContent/Linux/Content/Effects/BloomExtract.xnb and b/CompiledContent/Linux/Content/Effects/BloomExtract.xnb differ
diff --git a/CompiledContent/Linux/Content/Effects/Clouds.xnb b/CompiledContent/Linux/Content/Effects/Clouds.xnb
index 929c2ffd..e0226f19 100644
Binary files a/CompiledContent/Linux/Content/Effects/Clouds.xnb and b/CompiledContent/Linux/Content/Effects/Clouds.xnb differ
diff --git a/CompiledContent/Linux/Content/Effects/GaussianBlur.xnb b/CompiledContent/Linux/Content/Effects/GaussianBlur.xnb
index 2725f06c..ce80cb4f 100644
Binary files a/CompiledContent/Linux/Content/Effects/GaussianBlur.xnb and b/CompiledContent/Linux/Content/Effects/GaussianBlur.xnb differ
diff --git a/CompiledContent/Linux/Content/Effects/ParticleEffect.xnb b/CompiledContent/Linux/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..8fee9635
Binary files /dev/null and b/CompiledContent/Linux/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/Arial.xnb b/CompiledContent/Linux/Content/Fonts/Arial.xnb
new file mode 100644
index 00000000..785ffdb3
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/Arial.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/DataActiveFont.xnb b/CompiledContent/Linux/Content/Fonts/DataActiveFont.xnb
new file mode 100644
index 00000000..7269d88b
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/DataActiveFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/DataFont.xnb b/CompiledContent/Linux/Content/Fonts/DataFont.xnb
new file mode 100644
index 00000000..e6c6af6f
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/DataFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/InstructionsActiveFont.xnb b/CompiledContent/Linux/Content/Fonts/InstructionsActiveFont.xnb
new file mode 100644
index 00000000..ae63d2c9
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/InstructionsActiveFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/InstructionsFont.xnb b/CompiledContent/Linux/Content/Fonts/InstructionsFont.xnb
new file mode 100644
index 00000000..8db377c0
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/InstructionsFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/MenuFont.xnb b/CompiledContent/Linux/Content/Fonts/MenuFont.xnb
index 4515f0cc..e54f85c7 100644
Binary files a/CompiledContent/Linux/Content/Fonts/MenuFont.xnb and b/CompiledContent/Linux/Content/Fonts/MenuFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/TitleFont.xnb b/CompiledContent/Linux/Content/Fonts/TitleFont.xnb
new file mode 100644
index 00000000..9b62748c
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/TitleFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/TypeFont.xnb b/CompiledContent/Linux/Content/Fonts/TypeFont.xnb
new file mode 100644
index 00000000..b92a591a
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/TypeFont.xnb differ
diff --git a/CompiledContent/Linux/Content/Fonts/gamefont.xnb b/CompiledContent/Linux/Content/Fonts/gamefont.xnb
new file mode 100644
index 00000000..6a703334
Binary files /dev/null and b/CompiledContent/Linux/Content/Fonts/gamefont.xnb differ
diff --git a/CompiledContent/Linux/Content/Models/checker_1.xnb b/CompiledContent/Linux/Content/Models/checker_1.xnb
new file mode 100644
index 00000000..057c3403
Binary files /dev/null and b/CompiledContent/Linux/Content/Models/checker_1.xnb differ
diff --git a/CompiledContent/Linux/Content/Models/grid.xnb b/CompiledContent/Linux/Content/Models/grid.xnb
new file mode 100644
index 00000000..c6678e16
Binary files /dev/null and b/CompiledContent/Linux/Content/Models/grid.xnb differ
diff --git a/CompiledContent/Linux/Content/Models/ground_0.xnb b/CompiledContent/Linux/Content/Models/ground_0.xnb
new file mode 100644
index 00000000..426fcfa5
Binary files /dev/null and b/CompiledContent/Linux/Content/Models/ground_0.xnb differ
diff --git a/CompiledContent/Linux/Content/Models/terrain.xnb b/CompiledContent/Linux/Content/Models/terrain.xnb
new file mode 100644
index 00000000..c7f65af2
Binary files /dev/null and b/CompiledContent/Linux/Content/Models/terrain.xnb differ
diff --git a/CompiledContent/Linux/Content/Music/InGameSong_Loop.wav b/CompiledContent/Linux/Content/Music/InGameSong_Loop.wav
new file mode 100644
index 00000000..f2a09ec1
Binary files /dev/null and b/CompiledContent/Linux/Content/Music/InGameSong_Loop.wav differ
diff --git a/CompiledContent/Linux/Content/Music/InGameSong_Loop.xnb b/CompiledContent/Linux/Content/Music/InGameSong_Loop.xnb
index 72a71906..a67d5776 100644
Binary files a/CompiledContent/Linux/Content/Music/InGameSong_Loop.xnb and b/CompiledContent/Linux/Content/Music/InGameSong_Loop.xnb differ
diff --git a/CompiledContent/Linux/Content/Music/MenuMusic_Loop.wav b/CompiledContent/Linux/Content/Music/MenuMusic_Loop.wav
new file mode 100644
index 00000000..f181e5e9
Binary files /dev/null and b/CompiledContent/Linux/Content/Music/MenuMusic_Loop.wav differ
diff --git a/CompiledContent/Linux/Content/Music/MenuMusic_Loop.xnb b/CompiledContent/Linux/Content/Music/MenuMusic_Loop.xnb
index 5fa5a904..c709d1b3 100644
Binary files a/CompiledContent/Linux/Content/Music/MenuMusic_Loop.xnb and b/CompiledContent/Linux/Content/Music/MenuMusic_Loop.xnb differ
diff --git a/CompiledContent/Linux/Content/Music/One Step Beyond.wav b/CompiledContent/Linux/Content/Music/One Step Beyond.wav
new file mode 100644
index 00000000..5ec2c1bd
Binary files /dev/null and b/CompiledContent/Linux/Content/Music/One Step Beyond.wav differ
diff --git a/CompiledContent/Linux/Content/Music/One Step Beyond.xnb b/CompiledContent/Linux/Content/Music/One Step Beyond.xnb
new file mode 100644
index 00000000..77840fe9
Binary files /dev/null and b/CompiledContent/Linux/Content/Music/One Step Beyond.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/animation_60x60.xnb b/CompiledContent/Linux/Content/Textures/Buttons/animation_60x60.xnb
new file mode 100644
index 00000000..dcf5705c
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/animation_60x60.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/arrow1_left_60x60.xnb b/CompiledContent/Linux/Content/Textures/Buttons/arrow1_left_60x60.xnb
new file mode 100644
index 00000000..be7b59f2
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/arrow1_left_60x60.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/arrow1_right_60x60.xnb b/CompiledContent/Linux/Content/Textures/Buttons/arrow1_right_60x60.xnb
new file mode 100644
index 00000000..1f07a289
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/arrow1_right_60x60.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/lamp_60x60.xnb b/CompiledContent/Linux/Content/Textures/Buttons/lamp_60x60.xnb
new file mode 100644
index 00000000..864916d3
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/lamp_60x60.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/perPixelLight_60x60.xnb b/CompiledContent/Linux/Content/Textures/Buttons/perPixelLight_60x60.xnb
new file mode 100644
index 00000000..c5887c12
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/perPixelLight_60x60.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Buttons/textureOnOff.xnb b/CompiledContent/Linux/Content/Textures/Buttons/textureOnOff.xnb
new file mode 100644
index 00000000..4c561281
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Buttons/textureOnOff.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueDestroyed/blueCatapult_destroyed.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueDestroyed/blueCatapult_destroyed.xnb
new file mode 100644
index 00000000..94f98b55
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueDestroyed/blueCatapult_destroyed.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueFire/blueCatapult_fire.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueFire/blueCatapult_fire.xnb
new file mode 100644
index 00000000..43843211
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueFire/blueCatapult_fire.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueIdle/blueIdle.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueIdle/blueIdle.xnb
new file mode 100644
index 00000000..99c514b2
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Blue/blueIdle/blueIdle.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Blue/bluePullback/blueCatapult_Pullback.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Blue/bluePullback/blueCatapult_Pullback.xnb
new file mode 100644
index 00000000..4d437399
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Blue/bluePullback/blueCatapult_Pullback.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Fire_Miss/fire_miss.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Fire_Miss/fire_miss.xnb
new file mode 100644
index 00000000..f028b942
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Fire_Miss/fire_miss.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Hit_Smoke/smoke.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Hit_Smoke/smoke.xnb
new file mode 100644
index 00000000..c3b1d47c
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Hit_Smoke/smoke.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Red/redDestroyed/redCatapult_destroyed.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Red/redDestroyed/redCatapult_destroyed.xnb
new file mode 100644
index 00000000..644f7afc
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Red/redDestroyed/redCatapult_destroyed.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Red/redFire/redCatapult_fire.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Red/redFire/redCatapult_fire.xnb
new file mode 100644
index 00000000..8acd82d3
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Red/redFire/redCatapult_fire.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Red/redIdle/redIdle.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Red/redIdle/redIdle.xnb
new file mode 100644
index 00000000..b8123ea1
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Red/redIdle/redIdle.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/Catapults/Red/redPullback/redCatapult_Pullback.xnb b/CompiledContent/Linux/Content/Textures/Catapults/Red/redPullback/redCatapult_Pullback.xnb
new file mode 100644
index 00000000..0e41910c
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/Catapults/Red/redPullback/redCatapult_Pullback.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/HUD/Arrow.xnb b/CompiledContent/Linux/Content/Textures/HUD/Arrow.xnb
new file mode 100644
index 00000000..f85e2ea8
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/HUD/Arrow.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/HUD/ammoType.xnb b/CompiledContent/Linux/Content/Textures/HUD/ammoType.xnb
new file mode 100644
index 00000000..222ee346
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/HUD/ammoType.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/HUD/hudBackground.xnb b/CompiledContent/Linux/Content/Textures/HUD/hudBackground.xnb
new file mode 100644
index 00000000..39d76f58
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/HUD/hudBackground.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/HUD/windArrow.xnb b/CompiledContent/Linux/Content/Textures/HUD/windArrow.xnb
new file mode 100644
index 00000000..98b33f83
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/HUD/windArrow.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/background.xnb b/CompiledContent/Linux/Content/Textures/background.xnb
new file mode 100644
index 00000000..3572403c
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/background.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/blank.xnb b/CompiledContent/Linux/Content/Textures/blank.xnb
new file mode 100644
index 00000000..e5c0345b
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/blank.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/chat_able.xnb b/CompiledContent/Linux/Content/Textures/chat_able.xnb
new file mode 100644
index 00000000..d2f5e9d4
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/chat_able.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/chat_mute.xnb b/CompiledContent/Linux/Content/Textures/chat_mute.xnb
new file mode 100644
index 00000000..cec217a5
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/chat_mute.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/chat_ready.xnb b/CompiledContent/Linux/Content/Textures/chat_ready.xnb
new file mode 100644
index 00000000..203369b5
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/chat_ready.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/chat_talking.xnb b/CompiledContent/Linux/Content/Textures/chat_talking.xnb
new file mode 100644
index 00000000..a1eb62b5
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/chat_talking.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/checker.xnb b/CompiledContent/Linux/Content/Textures/checker.xnb
new file mode 100644
index 00000000..5b17f111
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/checker.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/circle.xnb b/CompiledContent/Linux/Content/Textures/circle.xnb
new file mode 100644
index 00000000..ba4a25d8
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/circle.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/connected_controller1.xnb b/CompiledContent/Linux/Content/Textures/connected_controller1.xnb
new file mode 100644
index 00000000..ce62324c
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/connected_controller1.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/connected_controller2.xnb b/CompiledContent/Linux/Content/Textures/connected_controller2.xnb
new file mode 100644
index 00000000..d71bde00
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/connected_controller2.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/connected_controller3.xnb b/CompiledContent/Linux/Content/Textures/connected_controller3.xnb
new file mode 100644
index 00000000..0b2f3e0a
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/connected_controller3.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/connected_controller4.xnb b/CompiledContent/Linux/Content/Textures/connected_controller4.xnb
new file mode 100644
index 00000000..f48e9400
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/connected_controller4.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/cursor.xnb b/CompiledContent/Linux/Content/Textures/cursor.xnb
new file mode 100644
index 00000000..2da6161a
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/cursor.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/directions.xnb b/CompiledContent/Linux/Content/Textures/directions.xnb
new file mode 100644
index 00000000..411684e6
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/directions.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/explosion.xnb b/CompiledContent/Linux/Content/Textures/explosion.xnb
new file mode 100644
index 00000000..b1ef7ec2
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/explosion.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/fire.xnb b/CompiledContent/Linux/Content/Textures/fire.xnb
new file mode 100644
index 00000000..c9127f26
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/fire.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/flare1.xnb b/CompiledContent/Linux/Content/Textures/flare1.xnb
new file mode 100644
index 00000000..3a8f7806
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/flare1.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/flare2.xnb b/CompiledContent/Linux/Content/Textures/flare2.xnb
new file mode 100644
index 00000000..17796741
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/flare2.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/flare3.xnb b/CompiledContent/Linux/Content/Textures/flare3.xnb
new file mode 100644
index 00000000..dd065d84
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/flare3.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/glow.xnb b/CompiledContent/Linux/Content/Textures/glow.xnb
new file mode 100644
index 00000000..0704f2c3
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/glow.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/gradient.xnb b/CompiledContent/Linux/Content/Textures/gradient.xnb
new file mode 100644
index 00000000..904671c7
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/gradient.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/select_controller1.xnb b/CompiledContent/Linux/Content/Textures/select_controller1.xnb
new file mode 100644
index 00000000..c19890cd
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/select_controller1.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/select_controller2.xnb b/CompiledContent/Linux/Content/Textures/select_controller2.xnb
new file mode 100644
index 00000000..dda7d346
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/select_controller2.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/select_controller3.xnb b/CompiledContent/Linux/Content/Textures/select_controller3.xnb
new file mode 100644
index 00000000..188fb5fa
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/select_controller3.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/select_controller4.xnb b/CompiledContent/Linux/Content/Textures/select_controller4.xnb
new file mode 100644
index 00000000..f9990947
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/select_controller4.xnb differ
diff --git a/CompiledContent/Linux/Content/Textures/sqbrush.xnb b/CompiledContent/Linux/Content/Textures/sqbrush.xnb
new file mode 100644
index 00000000..44bcd7a3
Binary files /dev/null and b/CompiledContent/Linux/Content/Textures/sqbrush.xnb differ
diff --git a/CompiledContent/OSX/Content/Effects/BloomCombine.xnb b/CompiledContent/OSX/Content/Effects/BloomCombine.xnb
index 028f9aa0..3b851259 100644
Binary files a/CompiledContent/OSX/Content/Effects/BloomCombine.xnb and b/CompiledContent/OSX/Content/Effects/BloomCombine.xnb differ
diff --git a/CompiledContent/OSX/Content/Effects/BloomExtract.xnb b/CompiledContent/OSX/Content/Effects/BloomExtract.xnb
index 6fcd66f6..8dd0ecb9 100644
Binary files a/CompiledContent/OSX/Content/Effects/BloomExtract.xnb and b/CompiledContent/OSX/Content/Effects/BloomExtract.xnb differ
diff --git a/CompiledContent/OSX/Content/Effects/GaussianBlur.xnb b/CompiledContent/OSX/Content/Effects/GaussianBlur.xnb
index 2725f06c..ce80cb4f 100644
Binary files a/CompiledContent/OSX/Content/Effects/GaussianBlur.xnb and b/CompiledContent/OSX/Content/Effects/GaussianBlur.xnb differ
diff --git a/CompiledContent/OSX/Content/Effects/ParticleEffect.xnb b/CompiledContent/OSX/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..8fee9635
Binary files /dev/null and b/CompiledContent/OSX/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/OSX/Content/Music/InGameSong_Loop.wma b/CompiledContent/OSX/Content/Music/InGameSong_Loop.wma
index 7ba4e63a..c66f5979 100644
Binary files a/CompiledContent/OSX/Content/Music/InGameSong_Loop.wma and b/CompiledContent/OSX/Content/Music/InGameSong_Loop.wma differ
diff --git a/CompiledContent/OSX/Content/Music/MenuMusic_Loop.wma b/CompiledContent/OSX/Content/Music/MenuMusic_Loop.wma
index 16f02662..c10d7f0f 100644
Binary files a/CompiledContent/OSX/Content/Music/MenuMusic_Loop.wma and b/CompiledContent/OSX/Content/Music/MenuMusic_Loop.wma differ
diff --git a/CompiledContent/OSX/Content/Music/One Step Beyond.wma b/CompiledContent/OSX/Content/Music/One Step Beyond.wma
index 79bf6d89..a327e524 100644
Binary files a/CompiledContent/OSX/Content/Music/One Step Beyond.wma and b/CompiledContent/OSX/Content/Music/One Step Beyond.wma differ
diff --git a/CompiledContent/Windows/Content/Effects/BloomCombine.xnb b/CompiledContent/Windows/Content/Effects/BloomCombine.xnb
index 028f9aa0..3b851259 100644
Binary files a/CompiledContent/Windows/Content/Effects/BloomCombine.xnb and b/CompiledContent/Windows/Content/Effects/BloomCombine.xnb differ
diff --git a/CompiledContent/Windows/Content/Effects/BloomExtract.xnb b/CompiledContent/Windows/Content/Effects/BloomExtract.xnb
index 6fcd66f6..8dd0ecb9 100644
Binary files a/CompiledContent/Windows/Content/Effects/BloomExtract.xnb and b/CompiledContent/Windows/Content/Effects/BloomExtract.xnb differ
diff --git a/CompiledContent/Windows/Content/Effects/GaussianBlur.xnb b/CompiledContent/Windows/Content/Effects/GaussianBlur.xnb
index 2725f06c..ce80cb4f 100644
Binary files a/CompiledContent/Windows/Content/Effects/GaussianBlur.xnb and b/CompiledContent/Windows/Content/Effects/GaussianBlur.xnb differ
diff --git a/CompiledContent/Windows/Content/Effects/ParticleEffect.xnb b/CompiledContent/Windows/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..8fee9635
Binary files /dev/null and b/CompiledContent/Windows/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/Windows/Content/Music/One Step Beyond.wma b/CompiledContent/Windows/Content/Music/One Step Beyond.wma
index 54824bb1..147030f4 100644
Binary files a/CompiledContent/Windows/Content/Music/One Step Beyond.wma and b/CompiledContent/Windows/Content/Music/One Step Beyond.wma differ
diff --git a/CompiledContent/Windows8/Content/Effects/ParticleEffect.xnb b/CompiledContent/Windows8/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..11c670fa
Binary files /dev/null and b/CompiledContent/Windows8/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/Windows8/Content/Music/One Step Beyond.wma b/CompiledContent/Windows8/Content/Music/One Step Beyond.wma
index 5e82254e..bf504430 100644
Binary files a/CompiledContent/Windows8/Content/Music/One Step Beyond.wma and b/CompiledContent/Windows8/Content/Music/One Step Beyond.wma differ
diff --git a/CompiledContent/iOS/Content/Effects/BloomCombine.xnb b/CompiledContent/iOS/Content/Effects/BloomCombine.xnb
index 028f9aa0..3b851259 100644
Binary files a/CompiledContent/iOS/Content/Effects/BloomCombine.xnb and b/CompiledContent/iOS/Content/Effects/BloomCombine.xnb differ
diff --git a/CompiledContent/iOS/Content/Effects/BloomExtract.xnb b/CompiledContent/iOS/Content/Effects/BloomExtract.xnb
index 6fcd66f6..8dd0ecb9 100644
Binary files a/CompiledContent/iOS/Content/Effects/BloomExtract.xnb and b/CompiledContent/iOS/Content/Effects/BloomExtract.xnb differ
diff --git a/CompiledContent/iOS/Content/Effects/GaussianBlur.xnb b/CompiledContent/iOS/Content/Effects/GaussianBlur.xnb
index 2725f06c..ce80cb4f 100644
Binary files a/CompiledContent/iOS/Content/Effects/GaussianBlur.xnb and b/CompiledContent/iOS/Content/Effects/GaussianBlur.xnb differ
diff --git a/CompiledContent/iOS/Content/Effects/ParticleEffect.xnb b/CompiledContent/iOS/Content/Effects/ParticleEffect.xnb
new file mode 100644
index 00000000..8fee9635
Binary files /dev/null and b/CompiledContent/iOS/Content/Effects/ParticleEffect.xnb differ
diff --git a/CompiledContent/iOS/Content/Fonts/Arial.xnb b/CompiledContent/iOS/Content/Fonts/Arial.xnb
index f8866dc3..5fd8d63f 100644
Binary files a/CompiledContent/iOS/Content/Fonts/Arial.xnb and b/CompiledContent/iOS/Content/Fonts/Arial.xnb differ
diff --git a/CompiledContent/iOS/Content/Fonts/TypeFont.xnb b/CompiledContent/iOS/Content/Fonts/TypeFont.xnb
index 97bf4e9e..97144e59 100644
Binary files a/CompiledContent/iOS/Content/Fonts/TypeFont.xnb and b/CompiledContent/iOS/Content/Fonts/TypeFont.xnb differ
diff --git a/MonoGame.Samples.Windows.sln b/MonoGame.Samples.Windows.sln
index d5a5c9f1..6d106e39 100644
--- a/MonoGame.Samples.Windows.sln
+++ b/MonoGame.Samples.Windows.sln
@@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.WindowsG
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Draw2D.Windows", "Draw2D\Draw2D.Windows.csproj", "{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParticleSettings.Windows", "Particle3DSample\ParticleSettings\ParticleSettings.Windows.csproj", "{3388FF68-6F15-4F36-B226-7823E5309E92}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Particle3DSample.Windows", "Particle3DSample\Particle3DSample.Windows.csproj", "{4E34D15A-4FDD-42D4-9645-83298049035C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -119,6 +123,34 @@ Global
{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|Mixed Platforms.Build.0 = Release|x86
{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.ActiveCfg = Release|x86
{8CFEF1FE-9E32-43EB-A730-EB3AACDC77B1}.Release|x86.Build.0 = Release|x86
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {3388FF68-6F15-4F36-B226-7823E5309E92}.Release|x86.ActiveCfg = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {4E34D15A-4FDD-42D4-9645-83298049035C}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Particle3DSample/Content/ParticleEffect.xnb b/Particle3DSample/Content/ParticleEffect.xnb
deleted file mode 100644
index 80fada50..00000000
Binary files a/Particle3DSample/Content/ParticleEffect.xnb and /dev/null differ
diff --git a/Particle3DSample/Particle3DSample.Windows.csproj b/Particle3DSample/Particle3DSample.Windows.csproj
new file mode 100644
index 00000000..1bad5ea1
--- /dev/null
+++ b/Particle3DSample/Particle3DSample.Windows.csproj
@@ -0,0 +1,129 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.0
+ 2.0
+ WinExe
+ Particle3DSample
+ Particle3DSample
+ {4E34D15A-4FDD-42D4-9645-83298049035C}
+
+
+ True
+ full
+ False
+ bin\Debug
+ DEBUG
+ prompt
+ 4
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ none
+ False
+ bin\Release
+ prompt
+ 4
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Content\ParticleEffect.xnb
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}
+ MonoGame.Framework.WindowsGL
+
+
+ {3388FF68-6F15-4F36-B226-7823E5309E92}
+ ParticleSettings.Windows
+
+
+
\ No newline at end of file
diff --git a/Particle3DSample/ParticleSettings/ParticleSettings.Windows.csproj b/Particle3DSample/ParticleSettings/ParticleSettings.Windows.csproj
new file mode 100644
index 00000000..be82df89
--- /dev/null
+++ b/Particle3DSample/ParticleSettings/ParticleSettings.Windows.csproj
@@ -0,0 +1,59 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.0
+ 2.0
+ {3388FF68-6F15-4F36-B226-7823E5309E92}
+ {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ ParticleSettingsWindows
+ ParticleSettings
+
+
+ True
+ full
+ False
+ bin\Debug
+ DEBUG
+ prompt
+ 4
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+ none
+ False
+ bin\Release
+ prompt
+ 4
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}
+ MonoGame.Framework.WindowsGL
+
+
+
\ No newline at end of file
diff --git a/Particle3DSample/ParticleSystem.cs b/Particle3DSample/ParticleSystem.cs
index 2042397c..31085504 100755
--- a/Particle3DSample/ParticleSystem.cs
+++ b/Particle3DSample/ParticleSystem.cs
@@ -256,7 +256,7 @@ void LoadParticleEffect ()
// Load the particle texture, and set it onto the effect.
Texture2D texture = content.Load (settings.TextureName);
- parameters ["Texture"].SetValue (texture);
+ parameters ["TextureSampler"].SetValue (texture);
}
diff --git a/Particle3DSample/Program.cs b/Particle3DSample/Program.cs
index dfbcbab4..fd923c36 100755
--- a/Particle3DSample/Program.cs
+++ b/Particle3DSample/Program.cs
@@ -1,5 +1,7 @@
+#if MONOMAC
using MonoMac.AppKit;
using MonoMac.Foundation;
+#endif
namespace Particle3DSample
{
@@ -10,17 +12,22 @@ static class Program
///
static void Main (string[] args)
{
+#if MONOMAC
NSApplication.Init ();
using (var p = new NSAutoreleasePool ()) {
NSApplication.SharedApplication.Delegate = new AppDelegate ();
NSApplication.Main (args);
}
-
+#else
+ using (var game = new Particle3DSampleGame()) {
+ game.Run();
+ }
+#endif
}
}
-
+#if MONOMAC
class AppDelegate : NSApplicationDelegate
{
Particle3DSampleGame game;
@@ -35,5 +42,6 @@ public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplicat
return true;
}
}
+#endif
}
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomCombine.fx b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomCombine.fx
index 0a4788e7..f5b49b65 100644
--- a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomCombine.fx
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomCombine.fx
@@ -48,8 +48,10 @@ technique BloomCombine
{
#if SM4
PixelShader = compile ps_4_0_level_9_1 PixelShaderF();
-#else
+#elif SM3
PixelShader = compile ps_3_0 PixelShaderF();
+#else
+ PixelShader = compile ps_2_0 PixelShaderF();
#endif
}
}
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomExtract.fx b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomExtract.fx
index b9f78519..e0fbef9e 100644
--- a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomExtract.fx
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/BloomExtract.fx
@@ -22,8 +22,10 @@ technique BloomExtract
{
#if SM4
PixelShader = compile ps_4_0_level_9_1 PixelShaderF();
-#else
+#elif SM3
PixelShader = compile ps_3_0 PixelShaderF();
+#else
+ PixelShader = compile ps_2_0 PixelShaderF();
#endif
}
}
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/Clouds.fx b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/Clouds.fx
index 4644befc..b84fe329 100644
--- a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/Clouds.fx
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/Clouds.fx
@@ -43,6 +43,8 @@ technique Technique1
{
#if SM4
PixelShader = compile ps_4_0_level_9_1 PixelShaderFunction();
+#elif SM3
+ PixelShader = compile ps_3_0 PixelShaderFunction();
#else
PixelShader = compile ps_2_0 PixelShaderFunction();
#endif
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/GaussianBlur.fx b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/GaussianBlur.fx
index 72d2d7b6..0e73d071 100644
--- a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/GaussianBlur.fx
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/GaussianBlur.fx
@@ -30,8 +30,10 @@ technique GaussianBlur
{
#if SM4
PixelShader = compile ps_4_0_level_9_1 PixelShaderF();
-#else
+#elif SM3
PixelShader = compile ps_3_0 PixelShaderF();
+#else
+ PixelShader = compile ps_2_0 PixelShaderF();
#endif
}
}
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/Effects/ParticleEffect.fx b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/ParticleEffect.fx
new file mode 100644
index 00000000..eff39600
--- /dev/null
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/Effects/ParticleEffect.fx
@@ -0,0 +1,202 @@
+//-----------------------------------------------------------------------------
+// ParticleEffect.fx
+//
+// Microsoft XNA Community Game Platform
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+
+
+// Camera parameters.
+float4x4 View;
+float4x4 Projection;
+float2 ViewportScale;
+
+
+// The current time, in seconds.
+float CurrentTime;
+
+
+// Parameters describing how the particles animate.
+float Duration;
+float DurationRandomness;
+float3 Gravity;
+float EndVelocity;
+float4 MinColor;
+float4 MaxColor;
+
+
+// These float2 parameters describe the min and max of a range.
+// The actual value is chosen differently for each particle,
+// interpolating between x and y by some random amount.
+float2 RotateSpeed;
+float2 StartSize;
+float2 EndSize;
+
+// Particle texture and sampler.
+sampler TextureSampler : register(s0) =
+sampler_state
+{
+ MinFilter = Linear;
+ MagFilter = Linear;
+ MipFilter = Point;
+
+ AddressU = Clamp;
+ AddressV = Clamp;
+};
+
+// Vertex shader input structure describes the start position and
+// velocity of the particle, and the time at which it was created,
+// along with some random values that affect its size and rotation.
+struct VertexShaderInput
+{
+ float2 Corner : POSITION0;
+ float3 Position : POSITION1;
+ float3 Velocity : NORMAL0;
+ float4 Random : COLOR0;
+ float Time : TEXCOORD0;
+};
+
+
+// Vertex shader output structure specifies the position and color of the particle.
+struct VertexShaderOutput
+{
+ float4 Position : POSITION0;
+ float4 Color : COLOR0;
+ float2 TextureCoordinate : COLOR1;
+};
+
+// Vertex shader helper for computing the position of a particle.
+float4 ComputeParticlePosition(float3 position, float3 velocity,
+ float age, float normalizedAge)
+{
+ float startVelocity = length(velocity);
+
+ // Work out how fast the particle should be moving at the end of its life,
+ // by applying a constant scaling factor to its starting velocity.
+ float endVelocity = startVelocity * EndVelocity;
+
+ // Our particles have constant acceleration, so given a starting velocity
+ // S and ending velocity E, at time T their velocity should be S + (E-S)*T.
+ // The particle position is the sum of this velocity over the range 0 to T.
+ // To compute the position directly, we must integrate the velocity
+ // equation. Integrating S + (E-S)*T for T produces S*T + (E-S)*T*T/2.
+
+ float velocityIntegral = startVelocity * normalizedAge +
+ (endVelocity - startVelocity) * normalizedAge *
+ normalizedAge / 2;
+
+ position += normalize(velocity) * velocityIntegral * Duration;
+
+ // Apply the gravitational force.
+ position += Gravity * age * normalizedAge;
+
+ // Apply the camera view and projection transforms.
+ return mul(mul(float4(position, 1), View), Projection);
+}
+
+
+// Vertex shader helper for computing the size of a particle.
+float ComputeParticleSize(float randomValue, float normalizedAge)
+{
+ // Apply a random factor to make each particle a slightly different size.
+ float startSize = lerp(StartSize.x, StartSize.y, randomValue);
+ float endSize = lerp(EndSize.x, EndSize.y, randomValue);
+
+ // Compute the actual size based on the age of the particle.
+ float size = lerp(startSize, endSize, normalizedAge);
+
+ // Project the size into screen coordinates.
+ return size * Projection._m11;
+}
+
+
+// Vertex shader helper for computing the color of a particle.
+float4 ComputeParticleColor(float4 projectedPosition,
+ float randomValue, float normalizedAge)
+{
+ // Apply a random factor to make each particle a slightly different color.
+ float4 color = lerp(MinColor, MaxColor, randomValue);
+
+ // Fade the alpha based on the age of the particle. This curve is hard coded
+ // to make the particle fade in fairly quickly, then fade out more slowly:
+ // plot x*(1-x)*(1-x) for x=0:1 in a graphing program if you want to see what
+ // this looks like. The 6.7 scaling factor normalizes the curve so the alpha
+ // will reach all the way up to fully solid.
+
+ color.a *= normalizedAge * (1-normalizedAge) * (1-normalizedAge) * 6.7;
+
+ return color;
+}
+
+
+// Vertex shader helper for computing the rotation of a particle.
+float2x2 ComputeParticleRotation(float randomValue, float age)
+{
+ // Apply a random factor to make each particle rotate at a different speed.
+ float rotateSpeed = lerp(RotateSpeed.x, RotateSpeed.y, randomValue);
+
+ float rotation = rotateSpeed * age;
+
+ // Compute a 2x2 rotation matrix.
+ float c = cos(rotation);
+ float s = sin(rotation);
+
+ return float2x2(c, -s, s, c);
+}
+
+
+
+// Custom vertex shader animates particles entirely on the GPU.
+VertexShaderOutput ParticleVertexShader(VertexShaderInput input)
+{
+ VertexShaderOutput output;
+
+ // Compute the age of the particle.
+ float age = CurrentTime - input.Time;
+
+ // Apply a random factor to make different particles age at different rates.
+ age *= 1 + input.Random.x * DurationRandomness;
+
+ // Normalize the age into the range zero to one.
+ float normalizedAge = saturate(age / Duration);
+
+ // Compute the particle position, size, color, and rotation.
+ output.Position = ComputeParticlePosition(input.Position, input.Velocity,
+ age, normalizedAge);
+
+ float size = ComputeParticleSize(input.Random.y, normalizedAge);
+ float2x2 rotation = ComputeParticleRotation(input.Random.w, age);
+
+ output.Position.xy += mul(input.Corner, rotation) * size * ViewportScale;
+
+ output.Color = ComputeParticleColor(output.Position, input.Random.z, normalizedAge);
+ output.TextureCoordinate = (input.Corner + 1) / 2;
+
+ return output;
+}
+
+
+// Pixel shader for drawing particles.
+float4 ParticlePixelShader(VertexShaderOutput input) : COLOR0
+{
+ return tex2D(TextureSampler, input.TextureCoordinate) * input.Color;
+}
+
+
+// Effect technique for drawing particles.
+technique Particles
+{
+ pass P0
+ {
+#if SM4
+ VertexShader = compile vs_4_0_level_9_1 ParticleVertexShader();
+ PixelShader = compile ps_4_0_level_9_1 ParticlePixelShader();
+#elif SM3
+ VertexShader = compile vs_3_0 ParticleVertexShader();
+ PixelShader = compile ps_3_0 ParticlePixelShader();
+#else
+ VertexShader = compile vs_2_0 ParticleVertexShader();
+ PixelShader = compile ps_2_0 ParticlePixelShader();
+#endif
+ }
+}
diff --git a/SamplesContentBuilder/SamplesContentBuilderContent/SamplesContentBuilderContent.contentproj b/SamplesContentBuilder/SamplesContentBuilderContent/SamplesContentBuilderContent.contentproj
index 2749b981..da7a6bf5 100644
--- a/SamplesContentBuilder/SamplesContentBuilderContent/SamplesContentBuilderContent.contentproj
+++ b/SamplesContentBuilder/SamplesContentBuilderContent/SamplesContentBuilderContent.contentproj
@@ -909,6 +909,13 @@
ModelProcessor
+
+
+ ParticleEffect
+ EffectImporter
+ MGEffectProcessor
+
+