mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
Fix thumbnail shader
This commit is contained in:
parent
eb2b6af0d7
commit
0d27e084f3
2 changed files with 8 additions and 10 deletions
|
@ -14,15 +14,14 @@ const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||||
|
|
||||||
#define INTENSITY_AMBIENT 0.3
|
#define INTENSITY_AMBIENT 0.3
|
||||||
|
|
||||||
attribute vec3 v_position;
|
|
||||||
attribute vec3 v_normal;
|
|
||||||
|
|
||||||
uniform mat4 view_model_matrix;
|
uniform mat4 view_model_matrix;
|
||||||
uniform mat4 projection_matrix;
|
uniform mat4 projection_matrix;
|
||||||
uniform mat3 normal_matrix;
|
uniform mat3 normal_matrix;
|
||||||
|
|
||||||
uniform mat4 volume_world_matrix;
|
uniform mat4 volume_world_matrix;
|
||||||
|
|
||||||
|
attribute vec3 v_position;
|
||||||
|
attribute vec3 v_normal;
|
||||||
|
|
||||||
// x = tainted, y = specular;
|
// x = tainted, y = specular;
|
||||||
varying vec2 intensity;
|
varying vec2 intensity;
|
||||||
varying vec4 world_pos;
|
varying vec4 world_pos;
|
||||||
|
@ -45,7 +44,7 @@ void main()
|
||||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||||
|
|
||||||
// Point in homogenous coordinates.
|
// 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;
|
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
|
#define INTENSITY_AMBIENT 0.3
|
||||||
|
|
||||||
in vec3 v_position;
|
|
||||||
in vec3 v_normal;
|
|
||||||
|
|
||||||
uniform mat4 view_model_matrix;
|
uniform mat4 view_model_matrix;
|
||||||
uniform mat4 projection_matrix;
|
uniform mat4 projection_matrix;
|
||||||
uniform mat3 normal_matrix;
|
uniform mat3 normal_matrix;
|
||||||
|
|
||||||
uniform mat4 volume_world_matrix;
|
uniform mat4 volume_world_matrix;
|
||||||
|
|
||||||
|
in vec3 v_position;
|
||||||
|
in vec3 v_normal;
|
||||||
|
|
||||||
// x = tainted, y = specular;
|
// x = tainted, y = specular;
|
||||||
out vec2 intensity;
|
out vec2 intensity;
|
||||||
out vec4 world_pos;
|
out vec4 world_pos;
|
||||||
|
@ -45,7 +44,7 @@ void main()
|
||||||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||||
|
|
||||||
// Point in homogenous coordinates.
|
// 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;
|
gl_Position = projection_matrix * position;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue