public void OnRender() { vao.Bind(); _shader.Bind(); Matrix4 lampMatrix = Matrix4.Identity; lampMatrix *= Matrix4.CreateScale(0.1f); lampMatrix *= Matrix4.CreateTranslation(Position); _shader.SetMatrix4("Model", lampMatrix); _shader.SetMatrix4("View", Camera.ViewMatrix); _shader.SetMatrix4("Projection", Camera.ProjectionMatrix); vao.Draw(); }
public void OnRender() { //return; vao.Bind(); _shader.Bind(); _shader.SetMatrix4("View", Camera.GetViewMatrix(Vector3.Zero)); _shader.SetMatrix4("Projection", Camera.ProjectionMatrix); txt.Bind(0); _shader.SetInt("Skybox", 0); GraphicsDevice.Default.DepthMask = false; //GL.DepthFunc(DepthFunction.Equal); GraphicsDevice.Default.DepthFunc = DepthFunction.Lequal; vao.Draw(); GraphicsDevice.Default.DepthFunc = DepthFunction.Less; GraphicsDevice.Default.DepthMask = true; }
public void OnRender() { if (!(Context.CurrentPipeline is ScreenPipeline)) { return; } vao.Bind(); _shader.Bind(); _shader.SetMatrix4("Model", GetModelMatrix()); SourceTexture.Bind(0); _shader.SetInt("screenTexture", 0); GraphicsDevice.Default.CullFace = false; vao.Draw(); GraphicsDevice.Default.CullFace = true; }