Game Programming Class14
Mixing 2D and 3D
I forgot to show you last week that the spritebatch draw code need to be modified slighty in order top mix 2D and 3D
spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Deferred, SaveStateMode.SaveState);
The xna basic effect is a simple implementation of a HLSL effect.
HLSL is Microsoft's High level implementation of FFE Fixed Function Pipeline implemented in video hardware.</p> GPU Hardware does two things The vertexr shader runs first and is rasterized to 2D then the pixel shaders run.
- Vertex Shader
- Pixel Shader
Lighting Demo with Basic Effect IntroMeshLights.zip