Skip to content

Commit

Permalink
fixing_shader
Browse files Browse the repository at this point in the history
Signed-off-by: Perminder Singh <[email protected]>
  • Loading branch information
perminder-17 authored Sep 14, 2024
1 parent 8c4d03f commit 6b522bf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions avogadro/rendering/solid_first_fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ uniform float offset;
uniform sampler2D inDepthTex;
// 1.0 if enabled, 0.0 if disabled
uniform float inAoEnabled;
// 1.0 if enabled, 0.0 if disabled
uniform float inFogEnabled;
// 0.0 if disabled
uniform float inFogStrength;
// Shadow strength for SSAO
uniform float inAoStrength;
// Fog strength
uniform float inFogStrength;
// 1.0 if enabled, 0.0 if disabled
uniform float inEdStrength;
// offset for zoom-in and zoom-out
Expand Down Expand Up @@ -142,7 +140,7 @@ void main() {
luminosity *= max(1.2 * (1.0 - inAoEnabled), computeSSAOLuminosity(getNormalNear(UV)));
luminosity *= max(1.0 - inEdStrength, computeEdgeLuminosity(getNormalAt(UV)));
vec4 color = texture2D(inRGBTex, UV);
if(inFogEnabled == 0.0){
if (inFogStrength == 0.0) {
gl_FragColor = vec4(color.xyz * luminosity, color.w);
}
else {
Expand All @@ -152,4 +150,4 @@ void main() {
gl_FragColor = fogColor;
}
gl_FragDepth = texture2D(inDepthTex, UV).x;
}
}

0 comments on commit 6b522bf

Please sign in to comment.