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
path: root/lib
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-02-21 11:39:28 +0300
committerbubnikv <bubnikv@gmail.com>2017-02-21 11:39:28 +0300
commit8aae5bdb28f99a6f6a1cf7bae2be621b47a0f1b7 (patch)
tree4e73d9ea51f15039ef4fb23e05ba9f26f637eb8c /lib
parent006173342cb339b3782f9cbb603dea82abb60331 (diff)
The variable layer editing shader was made OpenGL 2.0 compatible.version_1.33.8
Fixed a bug in the scaling of colors for the variable layer editing.
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GUI/3DScene.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm
index c20af1bfb..13306d26c 100644
--- a/lib/Slic3r/GUI/3DScene.pm
+++ b/lib/Slic3r/GUI/3DScene.pm
@@ -1700,8 +1700,8 @@ void main()
float lod = clamp(0.5 * log2(max(dx_vtc*dx_vtc, dy_vtc*dy_vtc)), 0., 1.);
// Sample the Z texture. Texture coordinates are normalized to <0, 1>.
vec4 color =
- (1. - lod) * texture2DLod(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), 0.) +
- lod * texture2DLod(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 1.);
+ (1. - lod) * texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row + 0.5 )), -10000.) +
+ lod * texture2D(z_texture, vec2(z_texture_col, z_texture_row_to_normalized * (z_texture_row * 2. + 1.)), 10000.);
// Mix the final color.
gl_FragColor =
vec4(intensity_specular, intensity_specular, intensity_specular, 1.) +