MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032591Open CASCADE[OCCT] OCCT:Visualizationpublic2021-09-26 18:082021-10-09 12:36
Reporterkgv 
Assigned Tosmoskvin 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 7.5.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032591: Visualization, V3d_View - improve corner gradient
DescriptionCorner gradient styles (Aspect_GFM_CORNER1 and others) are drawn using triangles with colored vertices.
This produces presentation of suboptimal quality due to interpolation formula.

This behavior could be improved.
Steps To Reproduce
pload VISUALIZATION
vinit View1
#vbackground RED BLUE -gradMode CORNER1
vbackground BLACK
vdrawparray p TRIANGLES v -1 -1 0 c 0 0 1 v -1 1 0 c 1 0 0 v 1 1 0 c 0 0 1 v 1 -1 0 c 0 0 1 e 1 e 2 e 
3  e 1 e 3 e 4
#vdrawparray p TRIANGLES v -1 -1 0 c 0 0 1 v -1 1 0 c 1 0 0 v 1 1 0 c 0 0 1 v 1 -1 0 c 0 0 1 e 1 e 2 
e 4  e 2 e 3 e 4
vtop
vfit


pload MODELING VISUALIZATION
vinit View1
box b 1 1 1
vdisplay -dispMode 1 b
vfit
#vtexture b c:/work/c.png -modulate 0 -repeat off -setFilter bilinear
set aShaderVert "
THE_SHADER_OUT vec2 TexCoord;
void main() {
  TexCoord    = occTexCoord.st;
  gl_Position = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix * occVertex;
}"

set aShaderFrag "
THE_SHADER_IN vec2 TexCoord;
vec4 THE_COLOR1 = vec4(1.0, 0.0, 0.0, 1.0);
vec4 THE_COLOR2 = vec4(0.0, 0.0, 1.0, 1.0);
void main() {
  vec4 c1 = mix (THE_COLOR1, THE_COLOR2, TexCoord.x);
  vec4 c2 = mix (THE_COLOR2, THE_COLOR2, TexCoord.x);
  occFragColor = mix (c2, c1, TexCoord.y);
}"
vtexture b 2
vshaderprog b -vert $aShaderVert -frag $aShaderFrag
TagsNo tags attached.
Test case numberopengl/background/bug21747
Attached Filespng file icon corn_grad.png (161,656 bytes) 2021-09-26 18:08
png file icon corner1.png (19,315 bytes) 2021-10-03 00:30

- Relationships

-  Notes
(0104493)
git (administrator)
2021-10-03 00:28

Branch CR32591 has been created by CheskoArt.

SHA-1: de055bc7d969cdfd35222d42179e3487fcf1c919


Detailed log of new commits:

Author: achesnok
Date: Sat Oct 2 16:33:48 2021 +0300

    0032591: Visualization, V3d_View - improve corner gradient
    
    - Added new shader for correct Aspect_GradientFillMethod_Corner mode shading.
(0104498)
git (administrator)
2021-10-04 13:26

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: 94cfce04f014a68ce47db63f2028cee26422e04a
(0104504)
kgv (developer)
2021-10-04 16:22

+Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getCorrectQuadProgram() const
...
+const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetCorrectQuadProgram ()
...
+  defaultGlslVersion (aProgSrc, "correctly_shaded_quad", 0);

"correctly_shaded_quad" sound confusing, maybe just "colored_quad"?


+    if (const Handle(OpenGl_Context) & aCtx = myWorkspace->GetGlContext())

Redundant space before &
(0104508)
git (administrator)
2021-10-04 22:42

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: e7c8024ede31f1771fa03e745e032bebf15eb337
(0104509)
CheskoArt (developer)
2021-10-04 22:44

Fixed, please review the patch.
Test results: http://jenkins-test-12.nnov.opencascade.com/view/CR32591-master-achesnok/view/ALL/ [^]
(0104514)
kgv (developer)
2021-10-05 02:37

+// function : getCorrectQuadProgram
+// purpose  :
+// =======================================================================
+Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram() const
...
+// function : GetCorrectQuadProgram
+// purpose  :
+// =======================================================================
+const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetColoredQuadProgram ()

Outdated descriptions.
(0104517)
git (administrator)
2021-10-05 11:59

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: 4d53e8d5cc751c3ac62369149977f4481a4ffbbc
(0104518)
kgv (developer)
2021-10-05 12:09

Please raise the patch
- OCCT: branch CR32591.
(0104529)
smoskvin (administrator)
2021-10-07 09:54

Problems of compilation with vc10, 11 win32/64
http://jenkins-test-11.nnov.opencascade.com/view/CR0-WEEK-40_CR0-WEEK-40/view/OCCT%20compile/job/CR0-WEEK-40_CR0-WEEK-40-OCCT-Windows-32-VC10-opt-compile/2/parsed_console/ [^]
(0104532)
git (administrator)
2021-10-07 20:10

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: c66b1d8291e757cc3c490ec2e093313ef489418d
(0104533)
CheskoArt (developer)
2021-10-07 20:12

Added missing '=' before {}-initialization
(0104534)
kgv (developer)
2021-10-07 23:03

Please try updated patch.
(0104565)
smoskvin (administrator)
2021-10-09 12:07

Combination -
OCCT branch : IR-2021-10-08
master SHA - 56b495d93bc70a96c9f07a6025b83e2e5e70eef7
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-10-08 SHA - fe10ebabd09fbeb2e94180b50cd581aa0612d135
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17935.650000000136 / 17754.63000000043 [+1.02%]
Products
Total CPU difference: 11611.53000000011 / 11405.930000000111 [+1.80%]
Windows-64-VC14:
OCCT
Total CPU difference: 19689.8125 / 19680.3125 [+0.05%]
Products
Total CPU difference: 12938.8125 / 12772.859375 [+1.30%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0104572)
git (administrator)
2021-10-09 12:36

Branch CR32591 has been deleted by mnt.

SHA-1: c66b1d8291e757cc3c490ec2e093313ef489418d

- Related Changesets
occt: master 956d9157
Timestamp: 2021-10-02 13:33:48
Author: achesnok
Committer: smoskvin
Details ] Diff ]
0032591: Visualization, V3d_View - improve corner gradient

- Added new shader for correct Aspect_GradientFillMethod_Corner mode shading.
mod - src/Graphic3d/Graphic3d_ShaderManager.cxx Diff ] File ]
mod - src/Graphic3d/Graphic3d_ShaderManager.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_BackgroundArray.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderManager.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_View.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2021-09-26 18:08 kgv New Issue
2021-09-26 18:08 kgv Assigned To => kgv
2021-09-26 18:08 kgv File Added: corn_grad.png
2021-09-26 18:09 kgv Assigned To kgv => CheskoArt
2021-09-26 18:09 kgv Status new => assigned
2021-10-03 00:28 git Note Added: 0104493
2021-10-03 00:30 CheskoArt File Added: corner1.png
2021-10-04 13:26 git Note Added: 0104498
2021-10-04 16:22 kgv Note Added: 0104504
2021-10-04 22:42 git Note Added: 0104508
2021-10-04 22:44 CheskoArt Note Added: 0104509
2021-10-04 22:44 CheskoArt Assigned To CheskoArt => kgv
2021-10-04 22:44 CheskoArt Status assigned => resolved
2021-10-05 02:37 kgv Note Added: 0104514
2021-10-05 10:17 kgv Assigned To kgv => CheskoArt
2021-10-05 10:17 kgv Status resolved => assigned
2021-10-05 10:17 kgv Target Version 7.7.0 => 7.6.0*
2021-10-05 10:18 kgv Test case number => opengl/background/bug21747
2021-10-05 11:59 git Note Added: 0104517
2021-10-05 12:00 CheskoArt Assigned To CheskoArt => kgv
2021-10-05 12:00 CheskoArt Status assigned => resolved
2021-10-05 12:09 kgv Note Added: 0104518
2021-10-05 12:09 kgv Assigned To kgv => bugmaster
2021-10-05 12:09 kgv Status resolved => reviewed
2021-10-07 09:54 smoskvin Note Added: 0104529
2021-10-07 09:54 smoskvin Assigned To bugmaster => kgv
2021-10-07 09:54 smoskvin Status reviewed => assigned
2021-10-07 10:31 kgv Assigned To kgv => CheskoArt
2021-10-07 20:10 git Note Added: 0104532
2021-10-07 20:12 CheskoArt Note Added: 0104533
2021-10-07 20:12 CheskoArt Assigned To CheskoArt => kgv
2021-10-07 20:12 CheskoArt Status assigned => resolved
2021-10-07 23:03 kgv Note Added: 0104534
2021-10-07 23:03 kgv Assigned To kgv => bugmaster
2021-10-07 23:03 kgv Status resolved => reviewed
2021-10-09 12:07 smoskvin Note Added: 0104565
2021-10-09 12:07 smoskvin Status reviewed => tested
2021-10-09 12:31 smoskvin Changeset attached => occt master 956d9157
2021-10-09 12:31 smoskvin Assigned To bugmaster => smoskvin
2021-10-09 12:31 smoskvin Status tested => verified
2021-10-09 12:31 smoskvin Resolution open => fixed
2021-10-09 12:36 git Note Added: 0104572


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker