mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-12 11:28:58 +08:00
Fix thumbnail shader
This commit is contained in:
parent
eb2b6af0d7
commit
0d27e084f3
@ -14,15 +14,14 @@ const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
uniform mat4 volume_world_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
varying vec2 intensity;
|
||||
varying vec4 world_pos;
|
||||
@ -45,7 +44,7 @@ void main()
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * gl_Vertex;
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
@ -14,15 +14,14 @@ const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
|
||||
#define INTENSITY_AMBIENT 0.3
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 normal_matrix;
|
||||
|
||||
uniform mat4 volume_world_matrix;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
// x = tainted, y = specular;
|
||||
out vec2 intensity;
|
||||
out vec4 world_pos;
|
||||
@ -45,7 +44,7 @@ void main()
|
||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * gl_Vertex;
|
||||
world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user