Skip to content

Show five-digit precision for texture transforms - #6049

Open
volksec wants to merge 5 commits into
secondlife:developfrom
volksec:agent/texture-transform-precision
Open

Show five-digit precision for texture transforms#6049
volksec wants to merge 5 commits into
secondlife:developfrom
volksec:agent/texture-transform-precision

Conversation

@volksec

@volksec volksec commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • show five decimal places for texture scale and offset controls
  • apply the same precision to diffuse, normal, and specular transforms
  • preserve precise values in the editor instead of redisplaying them rounded to three decimal places

Root cause

The transform spinners inherited the global three-decimal default. Values with greater precision could be submitted, but the controls immediately displayed a rounded value, which could overwrite the original value on a subsequent commit.

Validation

  • pre-commit run --from-ref upstream/develop --to-ref HEAD
  • parsed panel_tools_texture.xml and verified decimal_digits="5" on all 12 scale/offset controls
  • git diff --check upstream/develop...HEAD

Fixes #1861

@volksec
volksec marked this pull request as ready for review July 25, 2026 17:06
@Dzonatas

Copy link
Copy Markdown

Using IEEE numbers are not accurate. They get used mostly by default -- being the root cause. The only solution, still, is using decimals, but that takes more engineering work. C# has fully implemented decimals if you want to try them. You'll get more digits with decimals. Not a showstopper but it will matter.

volksec commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the context, @Dzonatas. This PR is intentionally scoped to #1861: it changes the display precision of the existing LLSpinCtrl fields from the inherited three-decimal default to five decimal places. It does not claim to provide exact decimal arithmetic or change the underlying F32 storage used by the Viewer.

Replacing the numeric representation would be a substantially broader architectural change and would be better handled separately. For this issue, the goal is to avoid the editor immediately redisplaying entered transform values rounded to only three decimal places, while remaining consistent with the existing Viewer data model. If the maintainers prefer a broader approach, I’m happy to follow their guidance.

@akleshchev
akleshchev self-requested a review July 26, 2026 20:29
@akleshchev

Copy link
Copy Markdown
Contributor

The last digit doesn't fit in the field. There seems to be plenty of space, so I suggest making sliders wide enough to fit whole value.
image
image

@volksec

volksec commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for pointing this out. I widened all 12 texture scale/offset spinners in commit 97e326e13a by increasing the control width and reducing the unused label area, so the full five-decimal value now has enough room to display.

I also re-ran the XML and pre-commit checks successfully.

@akleshchev

akleshchev commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Please, line this up (make sizes uniform), also that's too big, only one digit was invisible, there was no need to make this so big
image

Also makes me wonder if PBR's transform are supposed to change as well or not.

@Dzonatas

Dzonatas commented Aug 1, 2026

Copy link
Copy Markdown

There are issues, yes, especially with what leftovers that are available each day. My default response is to move and resize the tab. If it is more than serious, block the mail port. Offer some bottled water while we wait. Do something for about a half hour. Now type in a review. It will be appreciated.

@volksec

volksec commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 3a7c775.\n\n- Restored the uniform 265 px total width so the transform spinners line up with the neighboring controls.\n- Kept the increase compact: the label width is now 195 px (instead of 175 px), adding only enough field space for the extra digit.\n- Applied the same five-decimal precision and compact sizing to the PBR scale and offset controls.\n\nThe XML and pre-commit checks pass locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose 5 digits of precision for texture scale/offset values in edit window instead of rounding to 3 digits

3 participants