79302091

Date: 2024-12-23 03:55:23
Score: 1
Natty:
Report link

Its a very good idea to use a 2D Shader with Black Materials and Textures that render in front of your game. Seperate from the Shader you use to render your game scene.

Steps:

  1. Get the windows height and width variables:

GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());

float screenwidth = vidmode.width(); float screenheight = vidmode.height();

  1. Make a 2D Shader seperate from your InGame Vertex Shader

  2. Convert the screen coordinates to 2D OpenGL Coordinates

  3. With the 2D Shader. Make 2 Black Rectangles. Compared to the width and height of the screen

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jay Evans