mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 03:11:47 +00:00
Fix external outline Thickness (#14741)
* Fix external outline * Format and values * frag_color -> gl_FragColor * Remove Transform3d& view_matrix * Clarify rendering comments in 3DScene.cpp Updated comments to clarify rendering process using stencil buffer. --------- Co-authored-by: Ian Bassi <ian.bassi@outlook.com> Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
co-authored by
Ian Bassi
Noisyfox
parent
979e56f1d0
commit
33909a51cd
@@ -10,6 +10,7 @@ uniform sampler2D depth_texture;
|
||||
uniform sampler2D normal_texture;
|
||||
uniform float z_near;
|
||||
uniform float z_far;
|
||||
uniform bool is_outline;
|
||||
|
||||
in vec2 tex_coord;
|
||||
out vec4 frag_color;
|
||||
@@ -22,6 +23,10 @@ float linearize_depth(float depth)
|
||||
|
||||
void main()
|
||||
{
|
||||
if (is_outline) {
|
||||
frag_color = vec4(texture(color_texture, tex_coord).rgb, 1.0);
|
||||
return;
|
||||
}
|
||||
ivec2 pixel = ivec2(gl_FragCoord.xy);
|
||||
float center_depth = linearize_depth(texelFetch(depth_texture, pixel, 0).r);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user