View Issue Details

IDProjectCategoryView StatusLast Update
0028177CommunityOCCT:Visualizationpublic2021-08-24 14:13
ReporterMarkus Assigned Tokgv  
PrioritynormalSeverityminor 
Status newResolutionopen 
Product Version7.1.0 
Target Version7.7.0 
Summary0028177: Visualization - MSAA has no effect on clipping planes when using built-in GLSL programs
DescriptionIf MSAA is activated and a clipping plane used in the Samples, the edges at the clipping plane are not anti-aliased.

However, in Draw they are anti-aliased.

What is the difference? Or what can be the reason why it isn't working in the samples.
Steps To Reproduce- Open the Viewer3d sample
- Click on the button for "overlapped boxes"
- Switch on and adjust model clipping so that the box is clipped
- Switch on antialiasing
=> the edges at the clipping plane are not anti-aliased. The others are. See appended images.

However, in Draw it works:

pload ALL
vinit
vclipplane create pln1
vclipplane change pln1 equation 1 0 0 -0.1
vclipplane set pln1 view Driver1/Viewer1/View1
box b 100 100 100
vdisplay b
vsetdispmode 1
vfit
vrotate 10 10 10
vclipplane change pln1 equation 1 0 0 -0.5
vrenderparams -msaa 4

TagsNo tags attached.
Test case number

Attached Files

  • without MSAA.png (10,320 bytes)
  • with MSAA.png (11,377 bytes)
  • Draw 7.0 without MSAA.png (4,814 bytes)
  • Draw 7.0 with MSAA.png (5,085 bytes)

Relationships

related to 0028487 closedbugmaster Open CASCADE Visualization, TKOpenGl - add option for rendering with lower resolution 
child of 0027748 newkgv Open CASCADE Visualization - clipping and capping improvements 

Activities

Timo

2016-11-30 14:07

developer  

without MSAA.png (10,320 bytes)

Timo

2016-11-30 14:08

developer  

with MSAA.png (11,377 bytes)

kgv

2016-11-30 14:12

developer   ~0060918

> However, in Draw it works
There is no visual difference in Draw - the aliasing is same.

Timo

2016-11-30 14:52

developer   ~0060920

Sorry, it worked in OCCT 7.0.
It doesn't work anymore in OCCT 7.1.

Timo

2016-11-30 14:52

developer  

Draw 7.0 without MSAA.png (4,814 bytes)

Timo

2016-11-30 14:52

developer  

Draw 7.0 with MSAA.png (5,085 bytes)

kgv

2016-11-30 15:14

developer   ~0060924

Last edited: 2016-11-30 15:14

The difference is that fixed-function pipeline is not used by default anymore since OCCT 7.1.0.
You can enable it temporarily as a workaround if this issue is critical for you.

Timo

2016-11-30 15:21

developer   ~0060925

Thanks, it is not critical but it would be good to fix it.

kgv

2016-11-30 15:28

developer   ~0060927

Last edited: 2016-11-30 15:29

It is in TODO list (0027748):
> 1) Hardware supporting gl_ClipDistance
> (GLSL1.3 on desktop; APPLE_clip_distance
> or GL_EXT_clip_cull_distance on OpenGL ES)
> might show better performance since it allows
> skipping Fragment Shader if entire primitive (e.g. triangle)
> is behind the clipping plane(s).

Although there might be some another workaround for it, which is not clear for now.

Technically the problem is caused by *discard* command called to apply clipping plane within Fragment Shader.
So that entire pixel is either clipped or not,
making MSAA buffer samples equal from clipping planes point of view.

Issue History

Date Modified Username Field Change
2016-11-30 14:07 Timo New Issue
2016-11-30 14:07 Timo Assigned To => kgv
2016-11-30 14:07 Timo File Added: without MSAA.png
2016-11-30 14:08 Timo File Added: with MSAA.png
2016-11-30 14:12 kgv Note Added: 0060918
2016-11-30 14:52 Timo Note Added: 0060920
2016-11-30 14:52 Timo File Added: Draw 7.0 without MSAA.png
2016-11-30 14:52 Timo File Added: Draw 7.0 with MSAA.png
2016-11-30 15:14 kgv Note Added: 0060924
2016-11-30 15:14 kgv Note Edited: 0060924
2016-11-30 15:15 kgv Summary MSAA does not work at clipping plane in samples but it works in Draw => Visualization - MSAA has no effect on clipping planes when using built-in GLSL programs
2016-11-30 15:20 kgv Relationship added child of 0027748
2016-11-30 15:21 Timo Note Added: 0060925
2016-11-30 15:28 kgv Note Added: 0060927
2016-11-30 15:29 kgv Note Edited: 0060927
2016-11-30 15:29 kgv Note Edited: 0060927
2017-05-31 15:37 Timo Reporter Timo => Markus
2017-07-20 11:32 kgv Target Version 7.2.0 => 7.3.0
2018-03-13 14:37 kgv Target Version 7.3.0 => 7.4.0
2018-03-25 12:01 kgv Relationship added related to 0028487
2019-09-04 15:36 abv Target Version 7.4.0 => 7.5.0
2020-08-28 14:32 kgv Target Version 7.5.0 => 7.6.0
2021-08-24 14:13 kgv Target Version 7.6.0 => 7.7.0