View Issue Details

IDProjectCategoryView StatusLast Update
0032591Open CASCADEOCCT:Visualizationpublic2021-10-09 12:36
Reporterkgv Assigned Tosmoskvin  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.5.0 
Target Version7.6.0Fixed in Version7.6.0 
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 Files

  • corn_grad.png (161,656 bytes)
  • corner1.png (19,315 bytes)

Activities

kgv

2021-09-26 18:08

developer  

corn_grad.png (161,656 bytes)

git

2021-10-03 00:28

administrator   ~0104493

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.

CheskoArt

2021-10-03 00:30

developer  

corner1.png (19,315 bytes)

git

2021-10-04 13:26

administrator   ~0104498

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: 94cfce04f014a68ce47db63f2028cee26422e04a

kgv

2021-10-04 16:22

developer   ~0104504

+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 &

git

2021-10-04 22:42

administrator   ~0104508

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: e7c8024ede31f1771fa03e745e032bebf15eb337

CheskoArt

2021-10-04 22:44

developer   ~0104509

Fixed, please review the patch.
Test results: http://jenkins-test-12.nnov.opencascade.com/view/CR32591-master-achesnok/view/ALL/

kgv

2021-10-05 02:37

developer   ~0104514

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

Outdated descriptions.

git

2021-10-05 11:59

administrator   ~0104517

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: 4d53e8d5cc751c3ac62369149977f4481a4ffbbc

kgv

2021-10-05 12:09

developer   ~0104518

Please raise the patch
- OCCT: branch CR32591.

smoskvin

2021-10-07 09:54

administrator   ~0104529

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/

git

2021-10-07 20:10

administrator   ~0104532

Branch CR32591 has been updated forcibly by CheskoArt.

SHA-1: c66b1d8291e757cc3c490ec2e093313ef489418d

CheskoArt

2021-10-07 20:12

developer   ~0104533

Added missing '=' before {}-initialization

kgv

2021-10-07 23:03

developer   ~0104534

Please try updated patch.

smoskvin

2021-10-09 12:07

administrator   ~0104565

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

git

2021-10-09 12:36

administrator   ~0104572

Branch CR32591 has been deleted by mnt.

SHA-1: c66b1d8291e757cc3c490ec2e093313ef489418d

Related Changesets

occt: master 956d9157

2021-10-02 13:33:48

achesnok


Committer: smoskvin Details Diff
0032591: Visualization, V3d_View - improve corner gradient

- Added new shader for correct Aspect_GradientFillMethod_Corner mode shading.
Affected Issues
0032591
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