Page MenuHomeWildfire Games

Added multiples UVs to animated model
ClosedPublic

Authored by vladislavbelov on May 7 2017, 2:25 PM.

Details

Reviewers
wraitii
Stan
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP21291: Added multiples UVs to animated model
Trac Tickets
#2680
Summary

Replaces m_UV by m_UVs to support multiple UV per model, it could be used for AO of not really dynamic objects and etc.

I've not lost performance, but we should test it on different hardware to be sure of making this change.

Test Plan
  1. Run game
  2. Turn on profiler
  3. Run patched game
  4. Turn on profiler
  5. Compare results

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.May 7 2017, 2:25 PM
Stan edited edge metadata.May 7 2017, 2:54 PM

Thanks for working on this.

source/renderer/HWLightingModelRenderer.cpp
58 ↗(On Diff #1717)

i++ → ++i

68 ↗(On Diff #1717)

i++ → ++i

71 ↗(On Diff #1717)

Maybe could be one line dunno.

267 ↗(On Diff #1717)

Wrong identation I think

270 ↗(On Diff #1717)

Wrong identation I think

Vulcan added a subscriber: Vulcan.May 7 2017, 9:19 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/1057/ for more details.

vladislavbelov updated the Trac tickets for this revision.May 8 2017, 12:11 PM
Stan accepted this revision.Aug 7 2017, 1:39 PM
Stan added a subscriber: Itms.

Looks good to me. @wraitii or @Itms should check for c++ correctness but I'm okay with it.

This revision is now accepted and ready to land.Aug 7 2017, 1:39 PM
elexis added a subscriber: elexis.Aug 7 2017, 1:56 PM
In D448#30300, @Stan wrote:

I'm okay with it.

Reviewers should accept if the patch was reviewed (which includes understanding the code and testing for issues in the design / approach) and tested.
The patch description could be a bit more elaborate so that even readers who aren't familiar with the affected code can become convinced that the patch is as good as intended.

wraitii accepted this revision.Oct 28 2017, 12:28 PM

Looks good to me too, consider comments before committing.

source/renderer/HWLightingModelRenderer.cpp
46 ↗(On Diff #1717)

this might be the one case where std::array would be better than std::vector

vladislavbelov added inline comments.Oct 28 2017, 8:30 PM
source/renderer/HWLightingModelRenderer.cpp
46 ↗(On Diff #1717)

But std::array has a fixed size, which can't be changed in runtime.

wraitii added inline comments.Oct 28 2017, 8:32 PM
source/renderer/HWLightingModelRenderer.cpp
46 ↗(On Diff #1717)

Don't you only handle 2 Uvs atm?

vladislavbelov added inline comments.Oct 28 2017, 8:42 PM
source/renderer/HWLightingModelRenderer.cpp
46 ↗(On Diff #1717)

The size is variable. Maximum is 2 (possible maximum is 4, at least I have a diff for it: D433) and minimum is 1.

This revision was automatically updated to reflect the committed changes.