MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024322Open CASCADE[OCCT] OCCT:Visualizationpublic2013-11-06 11:052013-12-19 13:59
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.7.0 
Summary0024322: TKOpenGl - light sources management inconsistency
DescriptionFollowing issues should be fixed:
- Removing the last light source from V3d_View has no effect on OpenGL viewer (regression from 0024310). Black screen is expected instead. New arguments "clear" and "defaults" should be implemented for vlight command.
- Handling of multiple ambient light sources is inconsistent between fixed pipeline rendering (only last ambient light source is taken into account) and GLSL program / Ray Tracing (all ambient light sources accumulated into single source).

In addition it is suggested to remove following useless methods:
- Visual3d_Light::Limit()
- Visual3d_Light::Identification().

Suggestions from dbp:
- In OpenGl_ShaderManager::PushLightSourceState(), replace aParamsArray[aLightsNb * 4 + 1] constructions for packed attributes by structures (at C++ source level).
- Replace glUniform2iv()/glUniform4fv() with wrappers in OpenGl_ShaderProgram class.
TagsNo tags attached.
Test case numberv3d glsl(013) light_off
Attached Files? file icon light_off (383 bytes) 2013-11-07 19:41

- Relationships
related to 0024310closedabv TKOpenGl - GLSL compatibility issues 
related to 0024250closedbugmaster TKOpenGl - per-pixel lighting using GLSL program (Phong shading) 
related to 0024323closedapn TKOpenGl - spot light sources are not handled in Phong GLSL program 

-  Notes
(0026502)
duv (developer)
2013-11-07 15:34

Dear kgv,

Please review current implementation in branch CR24322_1.
(0026503)
kgv (developer)
2013-11-07 16:12

+    theAmbientColor.a() = 1.0;

implicit cast

+      toCreate  = Standard_False;
...
+      }
+
+    }

nits: redundant space, redundant empty line

+      Handle(V3d_Light) aLightDel;

unused variable

+  const OpenGl_Vec2i* Packed()

syntax "const OpenGl_Vec2i& Packed() const" followed by &Packed() will be more clear.

Please add new test case using "vlight clear" and "vreadpixel" in the grid v3d/glsl to verify the lights are turned off (and scene is black).
(0026506)
duv (developer)
2013-11-07 19:43

Dear kgv,

Remarks considered, new test attached to issue.
(0026507)
kgv (developer)
2013-11-07 21:04

Dear duv,

please proceed issue according to rules.
Test case should be committed within the patch itself in the git branch.
(0026520)
duv (developer)
2013-11-08 18:05

Dear kgv,

Please review updated version. Rebased onto master branch - CR24322_2.
(0026523)
kgv (developer)
2013-11-10 17:28

Please fix end-lines.
(0026549)
kgv (developer)
2013-11-11 17:43

Patch is ready for testing in CR24322_2 branch.
(0026578)
mkv (tester)
2013-11-13 08:33

Dear BugMaster,

Branch CR24322_2 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 1e693eda3669fd32b0e7c5e3adaeab9e9b4229ac

Number of compiler warnings:

occt component :
Linux: 318 (318 on master)
Windows: 0 (0 on master)

products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24322-2-master-occt/Debian60-64/v3d/glsl/light_off.html [^]
http://occt-tests/CR24322-2-master-occt/Windows-32-VC9/v3d/glsl/light_off.html [^]
v3d glsl(013) light_off: OK

Testing on Linux:
Total MEMORY difference: 356260288 / 356518076
Total CPU difference: 42825.1600000003 / 42449.670000000435

Testing on Windows:
Total MEMORY difference: 411597396 / 410757816
Total CPU difference: 32694.125 / 30177.1875

There are not differences in images found by testdiff.

- Related Changesets
occt: master 4fe9ad57
Timestamp: 2013-11-13 17:07:32
Author: duv
Committer: bugmaster
Details ] Diff ]
0024322: TKOpenGl - light sources management inconsistency

Fixed pipeline - accumulate all ambient light sources.

Fix clearing of all light sources.
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderProgram.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_ShaderProgram.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_View_2.cxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]
mod - src/Visual3d/Visual3d_Light.cdl Diff ] File ]
mod - src/Visual3d/Visual3d_Light.cxx Diff ] File ]
mod - src/Visual3d/Visual3d_View.cxx Diff ] File ]
add - tests/v3d/glsl/light_off Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-11-06 11:05 kgv New Issue
2013-11-06 11:05 kgv Assigned To => apl
2013-11-06 11:05 kgv Assigned To apl => kgv
2013-11-06 11:05 kgv Description Updated View Revisions
2013-11-06 11:05 kgv Relationship added related to 0024310
2013-11-06 11:18 kgv Description Updated View Revisions
2013-11-06 15:18 kgv Assigned To kgv => duv
2013-11-06 15:18 kgv Status new => assigned
2013-11-06 17:18 kgv Relationship added related to 0024323
2013-11-07 08:39 kgv Description Updated View Revisions
2013-11-07 15:34 duv Note Added: 0026502
2013-11-07 15:34 duv Assigned To duv => kgv
2013-11-07 15:34 duv Status assigned => resolved
2013-11-07 16:12 kgv Note Added: 0026503
2013-11-07 16:12 kgv Assigned To kgv => duv
2013-11-07 16:12 kgv Status resolved => assigned
2013-11-07 19:41 duv File Added: light_off
2013-11-07 19:43 duv Note Added: 0026506
2013-11-07 19:43 duv Status assigned => resolved
2013-11-07 21:04 kgv Note Added: 0026507
2013-11-07 21:04 kgv Status resolved => assigned
2013-11-08 18:05 duv Note Added: 0026520
2013-11-08 18:05 duv Assigned To duv => kgv
2013-11-08 18:05 duv Status assigned => resolved
2013-11-10 17:28 kgv Note Added: 0026523
2013-11-10 17:28 kgv Assigned To kgv => duv
2013-11-10 17:28 kgv Status resolved => assigned
2013-11-11 17:43 kgv Status assigned => resolved
2013-11-11 17:43 kgv Note Added: 0026549
2013-11-11 17:43 kgv Assigned To duv => bugmaster
2013-11-11 17:43 kgv Status resolved => reviewed
2013-11-12 12:03 mkv Assigned To bugmaster => mkv
2013-11-13 08:33 mkv Note Added: 0026578
2013-11-13 08:34 mkv Test case number => v3d glsl(013) light_off
2013-11-13 08:34 mkv Assigned To mkv => bugmaster
2013-11-13 08:34 mkv Status reviewed => tested
2013-11-13 20:35 kgv Relationship added related to 0024250
2013-11-15 10:24 bugmaster Changeset attached => occt master 4fe9ad57
2013-11-15 10:24 bugmaster Status tested => verified
2013-11-15 10:24 bugmaster Resolution open => fixed
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:59 bugmaster Fixed in Version => 6.7.0


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker