public ProjectionLight(Vector3 position, Quaternion rotation, int mapwidth, int mapheight, float fov, float near, float far) { camera = new Camera(position, Vector3.Zero, Vector3.UnitY, mapwidth / mapheight, fov, near, far); camera.LookAt(Vector3.Zero); FBO = new Framebuffer(mapwidth, mapheight, true); FBO.DepthInternalFormat = PixelInternalFormat.DepthComponent32f; FBO.DepthPixelFormat = PixelFormat.DepthComponent; FBO.DepthPixelType = PixelType.Float; }
public ProjectionLight(Vector3 position, Quaternion rotation, int mapwidth, int mapheight, float fov, float near, float far) { FarPlane = far; camera = new Camera(position, Vector3.Zero, mapwidth / mapheight, fov, near, far); camera.LookAt(Vector3.Zero); FBO = new Framebuffer(mapwidth, mapheight, true); //FBO.ColorInternalFormat = PixelInternalFormat.Rgba8; //FBO.ColorPixelFormat = PixelFormat.Rgba; //FBO.ColorPixelType = PixelType.UnsignedByte; Shader = GenericMaterial.FromName("ConeLight"); ViewPort = new Size(mapwidth, mapheight); }