View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032237 | Open CASCADE | OCCT:Visualization | public | 2021-03-22 20:12 | 2021-04-03 12:50 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.5.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection | ||||
Description | Gouraud shading does not compute view direction properly for a perspective camera projection:vec3 aView = (occWorldViewMatrixInverse * vec4(0.0, 0.0, 1.0, 0.0)).xyz; At the same time Phong shading handles perspective/orthographic projections independently: if (occProjectionMatrix[3][3] == 1.0) { View = vec3(0.0, 0.0, 1.0); } else { vec4 aPosition = occWorldViewMatrix * PositionWorld; View = -aPosition.xyz; } View = (occWorldViewMatrixInverse * vec4(View, 0.0)).xyz; Proper calculations might look like this: vec3 aView; if (occProjectionMatrix[3][3] == 1.0) { aView = (occWorldViewMatrixInverse * vec4(0.0, 0.0, 1.0, 0.0)).xyz; } else { vec3 anEye = (occWorldViewMatrixInverse * vec4(0.0, 0.0, 0.0, 1.0)).xyz; aView = normalize (anEye - aPositionWorld.xyz); } Note that existing behavior of Gouraud shader is more consistent to FFP lighting, so that patch would change this. | ||||
Steps To Reproduce | test bugs vis bug30412 1 | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
bug30412_cam_right_KO.png (7,689 bytes) |
|
bug30412_cam_right_OK.png (24,420 bytes) |
|
Patch is ready for review - OCCT: branch CR32237. http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32237-master-KGV/view/COMPARE/ |
|
The patch was reviewed without remarks |
|
Branch CR32237 has been created by kgv. SHA-1: 0f47d81a39b738f3d0307530806a88a7f9472b04 Detailed log of new commits: Author: kgv Date: Mon Mar 22 17:57:30 2021 +0300 0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera projection |
|
Combination - OCCT branch : WEEK-12 master SHA - 154b4635b8bd4c6c527738f59fd7d9d4f2cda509 a87b7ddc8cb44606b91e3f37113847c3f5f50fdc Products branch : WEEK-12 SHA - 0779901f5e4c7f986db723d4a181df62079baf71 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: 17172.74000000034 / 17208.820000000378 [-0.21%] Products Total CPU difference: 11546.97000000013 / 11481.660000000102 [+0.57%] Windows-64-VC14: OCCT Total CPU difference: 18612.140625 / 18668.765625 [-0.30%] Products Total CPU difference: 12857.140625 / 12879.75 [-0.18%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32237 has been deleted by inv. SHA-1: 0f47d81a39b738f3d0307530806a88a7f9472b04 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-22 20:12 | kgv | New Issue | |
2021-03-22 20:12 | kgv | Assigned To | => kgv |
2021-03-22 21:57 | kgv | File Added: bug30412_cam_right_KO.png | |
2021-03-22 21:57 | kgv | File Added: bug30412_cam_right_OK.png | |
2021-03-22 21:57 | kgv | Steps to Reproduce Updated | |
2021-03-22 22:05 | kgv | Note Added: 0099662 | |
2021-03-22 22:05 | kgv | Assigned To | kgv => osa |
2021-03-22 22:05 | kgv | Status | new => resolved |
2021-03-22 22:19 | kgv | Description Updated | |
2021-03-23 15:47 |
|
Note Added: 0099676 | |
2021-03-23 15:47 |
|
Assigned To | osa => bugmaster |
2021-03-23 15:47 |
|
Status | resolved => reviewed |
2021-03-23 22:23 | git | Note Added: 0099691 | |
2021-03-27 14:09 | bugmaster | Note Added: 0099781 | |
2021-03-27 14:09 | bugmaster | Status | reviewed => tested |
2021-03-27 14:11 | bugmaster | Test case number | => Not required |
2021-03-27 14:19 | bugmaster | Changeset attached | => occt master a0765350 |
2021-03-27 14:19 | bugmaster | Status | tested => verified |
2021-03-27 14:19 | bugmaster | Resolution | open => fixed |
2021-04-03 12:50 | git | Note Added: 0100055 |