Jump to content
IGNORED

Stretch and Tilt


pwwit1

Recommended Posts

Hello,

 

I'm having difficulty understanding how sprite stretching works.

 

In the image below, these 4 sprites (Sizes: 40x40, 32x32, 16x16 and 1x1) have exactly the same tilt and stretch values, but the amount of stretch varies by the sprite size.

I've noticed that the stretch value seems to be multiples of the sprite width, which is fine for 1x1 sprites as the stretch and tilt are equivalent at this size. This is a problem because the larger the image the less precision the stretch attribute has.

 

It also seems to contradict the documentation, which says stretch is a 16-bit fixed point value that is added to HSIZE per scanline (Although it does say per 'unit size', maybe 'unit size' is the sprite width?)

With 8-bits of precision I should be able to increment the stretch 1/256th of a pixel per scanline, but it seems to increment 1/256th * Sprite Width per scanline.

 

Is this correct behavior, if so, is it possible to create arbitrary polygons with large sprites?

 

Untitled.thumb.png.31db4329c0d8a72e07417258d1cf0845.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...