View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024250 | Open CASCADE | OCCT:Visualization | public | 2013-10-10 19:42 | 2014-03-05 10:28 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Platform | A | OS | L | ||
Target Version | 6.7.0 | Fixed in Version | 6.7.0 | ||
Summary | 0024250: TKOpenGl - per-pixel lighting using GLSL program (Phong shading) | ||||
Description | Implementing OpenGL/GLSL vertex and fragment shaders to enable per-pixel lighting (Phong shading). | ||||
Additional information and documentation updates | Phong shading (or normal-interpolation shading) overcomes some of the disadvantages of Gouraud shading implemented in the fixed OpenGL rendering pipeline. This technique performs per-fragment light calculations within GLSL program. At each fragment the interpolated surface normal is used to evaluate light intensity. Interpolation of normal allows highlights smaller than a polygon (see attached picture). The normal-interpolation shaders are implemented as part of OCCT visualization core (see Graphic3d_ShaderProgram::ShaderName enumeration). To enable per-fragment lighting computations the following DRAW command can be used: vshaderprog [name] phong To enable normal-interpolation shading in your application, see the source code of VShaderProg function (in TKViewerTest toolkit). New command vdefaults provide the way to control automatic triangulation parameters (deflection value and absolute/relative mode). | ||||
Tags | No tags attached. | ||||
Test case number | v3d glsl(013) phong_box, phong_couple, phong_fuse, phong_views | ||||
related to | 0021753 | resolved | mzernova | Open CASCADE | Visualization - improve shaded display of conical objects |
related to | 0024309 | closed | Open CASCADE | TKOpenGl - Shader resources should be released with delay | |
related to | 0024310 | closed | Open CASCADE | TKOpenGl - GLSL compatibility issues | |
related to | 0024323 | closed | apn | Open CASCADE | TKOpenGl - spot light sources are not handled in Phong GLSL program |
related to | 0024345 | closed | bugmaster | Open CASCADE | TKOpenGl - GLSL compatibility issues on NV40 (GeForce 6xxx/7xxx) |
related to | 0024322 | closed | bugmaster | Open CASCADE | TKOpenGl - light sources management inconsistency |
related to | 0024687 | closed | bugmaster | Open CASCADE | TKOpenGl shader programs - same view state for different v3d views |
2013-10-11 11:26 developer |
Comparison.png (115,670 bytes) |
|
The comparison of Gouraud shading (supported in fixed-fucntion pipeline) and Phong shading is provided in attached image (Comparison.png). In general, the difference is more noticeable for surfaces with rought tesselatiion and/or high-glossy materials. |
|
Please check case of incomplete cone (see issue 0021753) |
|
Dear kgv, the normal-interpolation shaders were implemented. Please review the branch CR24250. |
|
cameras_2views.png (85,186 bytes) |
|
Dear Bugmaster, please test the patch (branch CR24250_1). |
|
Dear Bugmaster, please notice that new grid "glsl" has been added to "v3d" tests group. |
|
Dear BugMaster, Branch CR24250_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 14915b76f3d544aba2e1ee4eec7cda8a84c00d37 Number of compiler warnings: occt component : Linux: 321 (323 on master) Windows: 0 (0 on master) products component : Linux: 189 (189 on master) Windows: 287 (287 on master) Regressions/Differences: No regressions/differences Testing cases: (Bad images) http://occt-tests/CR24250-1-master-occt/Debian60-64/v3d/glsl/phong_box.html http://occt-tests/CR24250-1-master-occt/Windows-32-VC9/v3d/glsl/phong_box.html v3d glsl(013) phong_box: OK http://occt-tests/CR24250-1-master-occt/Debian60-64/v3d/glsl/phong_couple.html http://occt-tests/CR24250-1-master-occt/Windows-32-VC9/v3d/glsl/phong_couple.html v3d glsl(013) phong_couple: OK http://occt-tests/CR24250-1-master-occt/Debian60-64/v3d/glsl/phong_fuse.html http://occt-tests/CR24250-1-master-occt/Windows-32-VC9/v3d/glsl/phong_fuse.html v3d glsl(013) phong_fuse: OK http://occt-tests/CR24250-1-master-occt/Debian60-64/v3d/glsl/phong_views.html http://occt-tests/CR24250-1-master-occt/Windows-32-VC9/v3d/glsl/phong_views.html v3d glsl(013) phong_views: OK Testing on Linux: Total MEMORY difference: 355832428 / 356251104 Total CPU difference: 42672.17000000131 / 40566.35000000072 Testing on Windows: Total MEMORY difference: 372223836 / 371127780 Total CPU difference: 24825.34375 / 28920.3125 There are not differences in images found by testdiff. |
|
Dear Bugmaster, these bad images are most likely issues of currently used version of OpenGL Mesa on Windows. Please mark these as TODO for Windows workstation and integrate. |
|
Branch CR24250_2 is patch against current IR. |
occt: master 392ac980 2013-11-01 09:52:19 Committer: bugmaster Details Diff |
0024250: TKOpenGl - per-pixel lighting using GLSL program (Phong shading) |
Affected Issues 0024250 |
|
mod - src/Graphic3d/Graphic3d_ShaderProgram.cxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_ShaderProgram.hxx | Diff File | ||
mod - src/Graphic3d/Graphic3d_TextureRoot.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectFace.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectLine.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectMarker.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_AspectText.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_CappingAlgo.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Caps.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Caps.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_Context.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_GraphicDriver_7.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderManager.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderManager.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderProgram.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderProgram.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_View.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_View.hxx | Diff File | ||
mod - src/OpenGl/OpenGl_View_2.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace_5.cxx | Diff File | ||
add - src/Shaders/PhongShading.fs | Diff File | ||
add - src/Shaders/PhongShading.vs | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx | Diff File | ||
mod - tests/v3d/begin | Diff File | ||
mod - tests/v3d/end | Diff File | ||
add - tests/v3d/glsl/phong_box | Diff File | ||
add - tests/v3d/glsl/phong_couple | Diff File | ||
add - tests/v3d/glsl/phong_fuse | Diff File | ||
add - tests/v3d/glsl/phong_views | Diff File | ||
mod - tests/v3d/grids.list | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-10 19:42 |
|
New Issue | |
2013-10-10 19:42 |
|
Assigned To | => san |
2013-10-11 08:32 |
|
Relationship added | related to 0021753 |
2013-10-11 11:26 |
|
File Added: Comparison.png | |
2013-10-11 11:30 |
|
Note Added: 0026042 | |
2013-10-11 11:53 |
|
Note Added: 0026043 | |
2013-10-11 16:17 |
|
Assigned To | san => dbp |
2013-10-11 16:17 |
|
Status | new => assigned |
2013-10-28 15:43 |
|
Note Added: 0026304 | |
2013-10-28 15:43 |
|
Assigned To | dbp => kgv |
2013-10-28 15:43 |
|
Status | assigned => resolved |
2013-10-28 16:18 |
|
Steps to Reproduce Updated | |
2013-10-28 16:18 |
|
Additional Information Updated | |
2013-10-29 07:17 | kgv | Reproducibility | have not tried => N/A |
2013-10-29 07:17 | kgv | Summary | Implementing vertex and fragment shaders to enable per-pixel lighting (Phong shading) => TKOpenGl - per-pixel lighting using GLSL program (Phong shading) |
2013-10-29 07:17 | kgv | Steps to Reproduce Updated | |
2013-10-30 08:49 | kgv | File Added: cameras_2views.png | |
2013-10-30 16:31 |
|
Note Added: 0026370 | |
2013-10-30 16:31 |
|
Assigned To | kgv => bugmaster |
2013-10-30 16:31 |
|
Status | resolved => reviewed |
2013-10-30 21:33 | kgv | Additional Information Updated | |
2013-10-31 08:13 |
|
Assigned To | bugmaster => mkv |
2013-10-31 11:25 | kgv | Note Added: 0026388 | |
2013-11-01 11:33 |
|
Note Added: 0026416 | |
2013-11-01 11:34 |
|
Test case number | => v3d glsl(013) phong_box, phong_couple, phong_fuse, phong_views |
2013-11-01 11:34 |
|
Assigned To | mkv => dbp |
2013-11-01 11:34 |
|
Status | reviewed => assigned |
2013-11-01 11:47 | kgv | Note Added: 0026417 | |
2013-11-01 11:47 | kgv | Assigned To | dbp => bugmaster |
2013-11-01 11:47 | kgv | Status | assigned => feedback |
2013-11-01 13:40 |
|
Status | feedback => tested |
2013-11-01 13:41 | kgv | Note Added: 0026420 | |
2013-11-01 21:28 | kgv | Relationship added | related to 0024309 |
2013-11-02 16:38 | kgv | Relationship added | related to 0024310 |
2013-11-06 11:07 | bugmaster | Changeset attached | => occt master 392ac980 |
2013-11-06 11:07 | bugmaster | Status | tested => verified |
2013-11-06 11:07 | bugmaster | Resolution | open => fixed |
2013-11-06 11:20 | bugmaster | Target Version | => 6.7.0 |
2013-11-06 17:18 | kgv | Relationship added | related to 0024323 |
2013-11-11 20:37 | kgv | Relationship added | related to 0024345 |
2013-11-13 20:35 | kgv | Relationship added | related to 0024322 |
2013-12-19 13:51 | bugmaster | Status | verified => closed |
2013-12-19 13:59 | bugmaster | Fixed in Version | => 6.7.0 |
2014-03-05 10:28 |
|
Relationship added | related to 0024687 |