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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl42
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl b/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
index 4ed7ed56c11..a71dfba575b 100644
--- a/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl
@@ -11,7 +11,7 @@ uniform vec4 frontColor;
uniform vec4 backColor;
uniform vec4 silhouetteColor;
-uniform vec3 eye; // direction we are looking
+uniform vec3 eye; // direction we are looking
uniform mat4 ModelViewProjectionMatrix;
@@ -31,24 +31,24 @@ const vec4 nowhere = vec4(vec3(0.0), 1.0);
void main()
{
- bool face_1_front = dot(N1, eye) > 0.0;
- bool face_2_front = dot(N2, eye) > 0.0;
-
- vec4 position = ModelViewProjectionMatrix * vec4(pos, 1.0);
-
- if (face_1_front && face_2_front) {
- // front-facing edge
- gl_Position = drawFront ? position : nowhere;
- finalColor = frontColor;
- }
- else if (face_1_front || face_2_front) {
- // exactly one face is front-facing, silhouette edge
- gl_Position = drawSilhouette ? position : nowhere;
- finalColor = silhouetteColor;
- }
- else {
- // back-facing edge
- gl_Position = drawBack ? position : nowhere;
- finalColor = backColor;
- }
+ bool face_1_front = dot(N1, eye) > 0.0;
+ bool face_2_front = dot(N2, eye) > 0.0;
+
+ vec4 position = ModelViewProjectionMatrix * vec4(pos, 1.0);
+
+ if (face_1_front && face_2_front) {
+ // front-facing edge
+ gl_Position = drawFront ? position : nowhere;
+ finalColor = frontColor;
+ }
+ else if (face_1_front || face_2_front) {
+ // exactly one face is front-facing, silhouette edge
+ gl_Position = drawSilhouette ? position : nowhere;
+ finalColor = silhouetteColor;
+ }
+ else {
+ // back-facing edge
+ gl_Position = drawBack ? position : nowhere;
+ finalColor = backColor;
+ }
}