Some units (Mauryan healer hero, healer with range techs) have their heal range circle with missing textures.
In fact when the numbers of subdivision is odd, the last one won't have the texture.
Indeed as the first vertices have (0,0) and (1,0) UVs, when we will close the line, the two last vertices will have (0,1) (1,0) in the even case (and the texture will properly apply to the quad) and (0,0) (1,0) in the odd case (and the texture won't properly apply to the quad).
Details
- Reviewers
vladislavbelov Sandarac elexis - Commits
- rP19833: Properly apply texture to the last quad of an overlay textured line. Reviewed…
- Trac Tickets
- #4617
An ingame test could consist to check the health range of a mauryan healer hero and of healer (before and after techs). You can also play to change the thickness or replace the texture with another (currently the defaults are in Heal component).
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
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! Checking XML files...
http://jw:8080/job/phabricator/1590/ for more details.
Executing section Default... Executing section Source... Executing section JS... Executing section XML GUI... Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/214/ for more details.
I've tested it, it works for me. The patch looks good for me.
P.S. It'd be good to have wire-frame mode for paths in future too. It'd help to debug these cases.
Thanks for the review.
(We had also the option to enforce having an even number of dots but I don't know if it's a wanted restricition.
In that case we would have to do job in other part of the code and it would add some limitations :/)
source/renderer/TexturedLineRData.cpp | ||
---|---|---|
241 ↗ | (On Diff #2628) | One can also directly use |