public void Apply(Window window) { if (!this.useDepth) { screenMesh.DrawTexture(renderTexture); } else { screenMesh.Draw((m) => { Graphics.BindTextureToUnit(renderTexture.Id, 0); Graphics.BindTextureToUnit(renderTexture.DepthId, 1); m.shader.SetUniform("tex", 0); m.shader.SetUniform("depth_tex", 1); }); } }
public void Apply(Window window) { screenMesh.DrawTexture(renderTexture); }