Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2020-04-08 10:00:08 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2020-04-08 10:00:08 +0300
commitbac10311bcb6ac47c71a6932bbcfcc8eb5dc30bf (patch)
treef5d0da474f79c1028a7ee8883fd7dd0548c7ec92 /resources
parentc887ecfefaeb627f656f4bc007f897b027dcf90a (diff)
Follow-up of c887ecfefaeb627f656f4bc007f897b027dcf90a -> Removed unneded assignements from shaders
Diffstat (limited to 'resources')
-rw-r--r--resources/shaders/gouraud.vs4
-rw-r--r--resources/shaders/variable_layer_height.vs4
2 files changed, 2 insertions, 6 deletions
diff --git a/resources/shaders/gouraud.vs b/resources/shaders/gouraud.vs
index a790b5d9e..2644d48e4 100644
--- a/resources/shaders/gouraud.vs
+++ b/resources/shaders/gouraud.vs
@@ -62,10 +62,8 @@ void main()
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
- intensity.y = 0.0;
-
vec3 position = (gl_ModelViewMatrix * gl_Vertex).xyz;
- intensity.y += LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
+ intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
// Perform the same lighting calculation for the 2nd light source (no specular applied).
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
diff --git a/resources/shaders/variable_layer_height.vs b/resources/shaders/variable_layer_height.vs
index 221cb5407..0e966b081 100644
--- a/resources/shaders/variable_layer_height.vs
+++ b/resources/shaders/variable_layer_height.vs
@@ -32,10 +32,8 @@ void main()
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
- intensity.y = 0.0;
-
vec3 position = (gl_ModelViewMatrix * gl_Vertex).xyz;
- intensity.y += LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
+ intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
// Perform the same lighting calculation for the 2nd light source (no specular)
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);