Comments (4)
Huh, that's weird... What hardware are you running on? (CPU & GPU model? amount of RAM?)
from opengl-gravity-simulator.
Huh, that's weird... What hardware are you running on? (CPU & GPU model? amount of RAM?)
i5-5200U 8GB AMD Radeon R7 M270
from opengl-gravity-simulator.
Let's try to remove some unessential features to see if they are causing the issue. If you are running the program build, navigate to where the .exe is located. You should have a shaders
folder. If you are building the program from source, navigate to the root of the project, and you should also have a shaders
folder there.
Open shaders/postprocessing/fragmentShader.glsl
in a text editor and replace all its content with this:
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D ScreenTexture;
uniform sampler2D EmissionTexture;
void main()
{
const float gamma = 2.2;
const float exposure = 1.0;
vec3 hdrColor = texture(ScreenTexture, TexCoords).rgb;
vec3 result = vec3(1.0) - exp(-hdrColor * exposure);
result = pow(result, vec3(1.0 / gamma));
FragColor = vec4(result, 1.0);
}
and then open shaders/stars/fragmentShader.glsl
and replace its content with this:
#version 330 core
// STAR SPHERE FRAGMENT SHADER
// Interpolated values from the vertex shaders
in vec3 Normal_cameraspace;
in vec2 uv;
// Ouput data
layout(location = 0) out vec3 color;
layout(location = 1) out vec3 emission;
void main() {
color = vec3(0);
emission = vec3(0);
}
that should get rid of the bloom effect and stars which should speed things up. If this doesn't change anything then the problem is not related to the speed of your GPU and might be a driver issue.
from opengl-gravity-simulator.
Thanks, the program can run smoothly now, and i can add some function to the modified shader. I am also interested in computer graphics and machine learning, and I am looking forward to your new program.
from opengl-gravity-simulator.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengl-gravity-simulator.