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_persp_geom.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl b/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl
index e7632fcad15..3de14704781 100644
--- a/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl
@@ -30,31 +30,31 @@ flat out vec4 finalColor;
void emitLine(vec4 color)
{
- gl_Position = ProjectionMatrix * MV_pos[0];
- EmitVertex();
- gl_Position = ProjectionMatrix * MV_pos[1];
- finalColor = color;
- EmitVertex();
- EndPrimitive();
+ gl_Position = ProjectionMatrix * MV_pos[0];
+ EmitVertex();
+ gl_Position = ProjectionMatrix * MV_pos[1];
+ finalColor = color;
+ EmitVertex();
+ EndPrimitive();
}
void main()
{
- float finalEdgeClass = max(edgeClass[0], edgeClass[1]);
-
- if (finalEdgeClass > 0.0f) {
- // front-facing edge
- if (drawFront)
- emitLine(frontColor);
- }
- else if (finalEdgeClass < 0.0f) {
- // back-facing edge
- if (drawBack)
- emitLine(backColor);
- }
- else {
- // exactly one face is front-facing, silhouette edge
- if (drawSilhouette)
- emitLine(silhouetteColor);
- }
+ float finalEdgeClass = max(edgeClass[0], edgeClass[1]);
+
+ if (finalEdgeClass > 0.0f) {
+ // front-facing edge
+ if (drawFront)
+ emitLine(frontColor);
+ }
+ else if (finalEdgeClass < 0.0f) {
+ // back-facing edge
+ if (drawBack)
+ emitLine(backColor);
+ }
+ else {
+ // exactly one face is front-facing, silhouette edge
+ if (drawSilhouette)
+ emitLine(silhouetteColor);
+ }
}