MrJoy / UnitySVG

SVG renderer for Unity3D.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to scale this SVG properly?

ProgrammingLife opened this issue · comments

I load SVG into a plane then I change transition.scale in editor and get something like this:
http://oi68.tinypic.com/1zq3oet.jpg
Doesn't look like a true vector :) How to resize it properly?

UnitySVG does not re-render automatically, and also cannot consider texel density at render-time, since the rendering of the SVG to a texture happens in a way that is de-coupled from the rendering of that texture to the screen.

If I were in your situation I would either render the SVG at a higher-than-needed resolution, or keep track of transition.scale and its relationship to the viewport (position/rotation are relevant for that) explicitly and re-render when a significant change occurs.

Since re-rendering is likely to be quite slow, it might be worth rendering the SVG into textures of a variety of sizes, and dynamically switch between those based on how much screen area is being consumed by the object the texture is being used for.