Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for black screen #65

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion NonEuclidean/Shaders/pink.frag
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ precision highp float;
uniform sampler2D tex;

//Outputs
out vec4 gl_FragColor;
//out vec4 gl_FragColor;

void main(void) {
gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
Expand Down
2 changes: 1 addition & 1 deletion NonEuclidean/Shaders/portal.frag
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ uniform sampler2D tex;
in vec4 ex_uv;

//Outputs
out vec4 gl_FragColor;
//out vec4 gl_FragColor;

void main(void) {
vec2 uv = (ex_uv.xy / ex_uv.w);
Expand Down
2 changes: 1 addition & 1 deletion NonEuclidean/Shaders/sky.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ precision highp float;
in vec3 ex_normal;

//Outputs
out vec4 gl_FragColor;
//out vec4 gl_FragColor;

void main(void) {
vec3 n = normalize(ex_normal);
Expand Down
2 changes: 1 addition & 1 deletion NonEuclidean/Shaders/texture.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in vec2 ex_uv;
in vec3 ex_normal;

//Outputs
out vec4 gl_FragColor;
//out vec4 gl_FragColor;

void main(void) {
float s = dot(ex_normal, LIGHT)*0.5 + 0.5;
Expand Down
2 changes: 1 addition & 1 deletion NonEuclidean/Shaders/texture_array.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in vec3 ex_uv;
in vec3 ex_normal;

//Outputs
out vec4 gl_FragColor;
//out vec4 gl_FragColor;

void main(void) {
float s = dot(ex_normal, LIGHT)*0.25 + 0.75;
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ A NonEuclidean rendering engine for Windows, written in C++ OpenGL.
To see what this code is about, check out this video:
https://youtu.be/kEB11PQ9Eo8

## Source Code Dependencies
Add glew-2.1.0 to the main directory

## Controls
* **Mouse** - Look around
* **AWSD** - Movement
* **1 - 7** - Switch between different demo rooms
* **Alt + Enter** - Toggle Fullscreen
* **Esc** - Exit demo

## BEST OF ALL: BLACK SCREEN FIX!
For whoever out there is trying to play this demo but having a black screen (like mine)
Enjoy! :)

(Btw the fix is really easy. Just find the "out vec4 gl_FragColor;" line in these 5 files: pink.frag, portal.frag, sky.frag, texture.frag, texture_array.frag and comment out the line mentioned earlier (which basically means adding "//" in front of the line, for example, "//out vec4 gl_FragColor;"). This fix was found by @multivac3834 at #45. This is just a longer explanation.)

## Thanks
Thank you @ehx-v1 for telling me how to ACTUALLY fix this issue. I also thank @multivac3834 for finding the fix.