Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sergeysinyavsky/dsfonts


https://github.com/sergeysinyavsky/dsfonts

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# DSFonts

This is a set of shaders and materials for the distance field font for [Defold engine](http://www.defold.com) .

## Installation

You can use the DSFonts library in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/).
Open your game.project file and in the dependencies field under project add:

>https://github.com/sergeysinyavsky/dsfonts/archive/master.zip

## Example
![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/full.png)

## Shaders

#### Bevel shader
Parameters:

`step.x` - change bevel level. Default 1024.

`step.y` - change brightness. Default 2.

![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/bevel.png)

#### Bevel normal shader
Parameters:

`step.x` - change bevel level. Default 1024.

![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/bevel-normal.png)

#### Gradient shader
Parameters:

`color` - Normal color will be **left** in x direction and **top** in y direction.

`next_color` - Second color will be **right** in x direction and **bottom** in y direction.. Default (1, 1, 1, 1).

`direction.x` - Specifies the direction for the x coordinate. From -1 to 1. Default 1.

`direction.y` - Specifies the direction for the y coordinate. From -1 to 1. Default 0.

![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/gradient.png)

#### Glow shader
Parameters:

`glow_color` - Color for glow. Default (1, 1, 1, 1).

`strength.x` - Outer strength. Default 0.

`strength.y` - Inner strength. Default 2.

`strength.z` - Sharpness strength. Default 30.

![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/glow.png)

#### Gradient bevel shader
Parameters:

`step.x` - change bevel level. Default 1024.

`step.y` - change brightness. Default 2.

`color` - Normal color will be **left** in x direction and **top** in y direction.

`next_color` - Second color will be **right** in x direction and **bottom** in y direction.. Default (1, 1, 1, 1).

`direction.x` - Specifies the direction for the x coordinate. From -1 to 1. Default 0.

`direction.y` - Specifies the direction for the y coordinate. From -1 to 1. Default 1.

![screenshot](https://raw.githubusercontent.com/sergeysinyavsky/dsfonts/master/example/scrins/gradient-bevel.png)

---