# The credit

The SDK is free on one condition: where your users see the avatars, they see "Powered by 360sona", linking to
https://360sona.com. The SDK shows it for you, as a small badge in a corner of the frame and as text inside every
file it writes. You may move the badge, or turn it off and put the line in your credits, about page or store page
instead. The wording is always "Powered by 360sona".

```sh
sona render seed:vega -o vega.png --gate
sona render seed:vega -o vega-plain.png --no-credit --gate
```

The first picture has the badge in its corner; the second has none, for a page that shows the credit itself.
Both commands are the `sona` tool's ([seed avatars and item files](sources.md)).

## Where the SDK shows it

| Where | What the SDK does | To move it or turn it off |
|---|---|---|
| `sona_draw` and `sona_snapshot` | Draws the badge in a corner once an avatar is on screen | `sona_draw_options.credit_corner`; `SONA_DRAW_NO_CREDIT` |
| The web SDK | The same badge over the canvas | `credit: false` |
| Unity, Godot, Unreal | The `SonaCredit` component, the addon's and the plugin's badge | Unity: `SonaCredit.corner`, `showBadge`. Godot: `SonaCredit.corner`, `SonaServer.credit_enabled`. Unreal: `CreditCorner`, `bShowCredit` in the project settings |
| `sona_png_encode`, headless renders | The PNG's `Software`, `Source` and `Comment` text: "360sona", the address, "Powered by 360sona" | Leave it there |
| GLB, VRM and FBX exports | The credit in the file's metadata | Leave it there |
| Sprite sheets | No badge on a frame | Show the credit in the game |
| `sona render` on the command line | The badge, and the text chunks | `--no-credit` |

The corners are `SONA_CORNER_BOTTOM_RIGHT` (the default), `_BOTTOM_LEFT`, `_TOP_RIGHT` and `_TOP_LEFT`. The badge is
the same art everywhere, shown at a fixed 75% strength; a snapshot scales it with the picture, one size for every 400
pixels of its shorter side.

## In your own UI

To draw the badge yourself (a corner of your HUD, an about screen), take its pixels and link it to the address:

```c
sona_credit credit;
if (sona_credit_get(ctx, 2, &credit) == SONA_OK) {
  /* credit.rgba is credit.width x credit.height RGBA pixels: show them at 75%, linked to credit.url */
}
```

```cpp
sona_credit credit;
if (ctx.credit(2, credit) == SONA_OK) {
  // credit.rgba is credit.width x credit.height RGBA pixels: show them at 75%, linked to credit.url
}
```

```csharp
var credit = ctx.GetCredit(2);
// credit.Rgba is credit.Width x credit.Height RGBA pixels: show them at 75%, linked to credit.Url
```

```rust
let credit = ctx.credit(2)?;
// credit.rgba is credit.width x credit.height RGBA pixels: show them at 75%, linked to credit.url
```

```python
credit = ctx.credit(2)
# credit["rgba"] is credit["width"] x credit["height"] RGBA pixels: show them at 75%, linked to credit["url"]
```

The second argument is the scale: 1, 2 or 3 are the art's own sizes, and larger scales are the 3x art resampled.
`credit.text` is "Powered by 360sona" and `credit.url` is https://360sona.com.

## When the badge is off

`SONA_DRAW_NO_CREDIT` and the other switches turn the badge off; they do not turn the condition off. A game that
draws no badge shows "Powered by 360sona", linking to https://360sona.com, in at least one of: its credits, its about
page, its store page. A site shows it in its footer or on its about page.

## What it is not

- Not an endorsement line. The credit says what draws the avatars; your game must not say 360sona or Microsoft
  endorses it ([licence and credit](../licence.md#trademarks)).
- Not a line to reword. It is always "Powered by 360sona".
- Not a fee. There is no paid tier that removes it.

## Related

- [Licence and credit](../licence.md): what the licence allows and asks.
- [What may a game ship?](../answers/what-may-i-ship.md)
