I'm trying to make a shader and I need a fullscreen quad to do so.
I have everything set up and working, but when I render the quad it appears as a small square. This would probably be because I'm passing the cameras world, projection and view matrix into the shader and so the quad appears as a normal object. If I remove this it doesn't appear at all.
How do I go from it rendering as a part of the scene which moves with the camera to being something that completely covers the screen?
edit:
Vertices:
new VertexPositionTexture(new Vector3(-1, -1, 0), new Vector2(0, 0)), new VertexPositionTexture(new Vector3(1, -1, 0), new Vector2(1, 0)), new VertexPositionTexture(new Vector3(-1, 1, 0), new Vector2(0, 1)), new VertexPositionTexture(new Vector3(1, 1, 0), new Vector2(1, 1)) Indices:
ushort[] indices = { 0, 1, 2, 2, 1, 3 }; Render:
for (int l = 0; l < loader.GlowShader.CurrentTechnique.Passes.Count; l++) { //loader.GlowShader.Parameters["World"].SetValue(camera.World); //loader.GlowShader.Parameters["View"].SetValue(camera.View); //loader.GlowShader.Parameters["Projection"].SetValue(camera.Projection); loader.GlowShader.Parameters["glowTexture"].SetValue(renderTargetTexture); loader.GlowShader.CurrentTechnique.Passes[l].Apply(); renderQuad.Render(); }
ftransformand no matrix multiplication. \$\endgroup\$