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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'resources/shaders/variable_layer_height.vs')
-rw-r--r--resources/shaders/variable_layer_height.vs7
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/shaders/variable_layer_height.vs b/resources/shaders/variable_layer_height.vs
index 2c918c0d4..9763859d0 100644
--- a/resources/shaders/variable_layer_height.vs
+++ b/resources/shaders/variable_layer_height.vs
@@ -14,6 +14,8 @@ const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
#define INTENSITY_AMBIENT 0.3
+uniform mat4 volume_world_matrix;
+
// x = tainted, y = specular;
varying vec2 intensity;
@@ -38,9 +40,8 @@ void main()
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
-
- // Scaled to widths of the Z texture.
- object_z = gl_Vertex.z;
+ // Scaled to widths of the Z texture.
+ object_z = (volume_world_matrix * gl_Vertex).z;
gl_Position = ftransform();
}