Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kan6868/solar2D-shader


https://github.com/kan6868/solar2D-shader

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Shader Effect Of Solar2D
### The repository that synthesizes [Solar2D](https://solar2d.com) shaders made or collected by Kan.
***Note:***
Because I don't use Ios, macOS, Linux and Nintendo switch devices, I can't test shaders on these platforms. If you use my shader on these platforms and it works fine then please let me know.

Thanks you very much!


**- Symbol summary:**


| Symbol | Describe |
|-----------|--------------|
|☑ | Supported |
|☐ | Not test yet |
|☒ | Unsupported |

**- List of shaders:**


- [Sway](#sway-shader)
- [Burn](#burn-shader)
- [CRT](#crt-shader)

## Sway Shader

![Sway](https://i.imgur.com/b8xv2Ps.gif)


*- Lua code:*
```Lua
require "sway"
object.fill.effect = "filter.custom.sway"
object.fill.effect.offset = 0.0 -- make different
object.fill.effect.heightOffset = 0.6 -- The height where the wind begins to move
object.fill.effect.distortion = 0.5 -- The strength of geometry distortion.
```
*- Support platforms:*

| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☑|
| Nintendo Switch |☑|

## Burn Shader

![Burn](https://i.imgur.com/Z0NW4tN.gif)

- For mobile devices need to add 1 texture noise.

*- Lua code:*
```Lua
--Mobile version
object.fill = {
type = "composite",
paint1 = { type = "image", filename = "image.png" },
paint2 = { type = "image", filename = "noise.jpg" }
}

require "burn_mobile"

object.fill.effect = "filter.custom.burn"
object.fill.effect.startTime = system.getTimer() / 1000
object.fill.effect.duration = 2.0
```


```Lua
--Other version (not need noise texture)
require "burn"
object.fill.effect = "filter.custom.burn"
object.fill.effect.startTime = system.getTimer()/1000
object.fill.effect.duration = 2.0
```
*- Support platforms:*

| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☒|
| Nintendo Switch |☑|

## CRT Shader

![CRT](https://user-images.githubusercontent.com/70838508/215328995-63515cca-4582-4ebf-8b31-c1d14330e63b.gif)


```Lua
require "crt"
object.fill.effect = "filter.custom.crt"
```
*- Support platforms:*

| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☒|
| Nintendo Switch |☑|

Ref: https://godotshaders.com/shader/vhs-and-crt-monitor-effect/;

## Sponsor this project
- Support me via [Patreon](https://www.patreon.com/kandev).
- Gift me a coffee cup: [Kofi](https://www.ko-fi.com/kandev)