• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

gamedevserj/Godot-Shaders: A collection of various shader effects for Godot game ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

gamedevserj/Godot-Shaders

开源软件地址:

https://github.com/gamedevserj/Godot-Shaders

开源编程语言:

GLSL 60.3%

开源软件介绍:

Godot shaders

A collection of shaders that I wrote in Unity converted to be used in Godot.

Godot version 3.2.1

Reflective water

This shader uses SCREEN_TEXTURE to display reflective image to simulate water. Just like the one in Unity it has some limitations.

Reflection is calculated using object's position, which means if you want to have reflection from top of the object then you need to set Y axis offset to half its height. Visible height of the water object can not exceed the distance to the top of the screen.

Adjustable parameters:
Reflection offset
Reflection blur(1)
Distortion
Waves
Shoreline
Shoreline foam

(1) Reflection blur is only available when project's dirver is set to GLES3, which might break effect stacking (eg. impact effect might completely remove water). A way to deal with this is described here.

Here's an example of the limitations.

In the first image the water starts from the bottom of the screen and goes up to the middle. Which means its visible height is equal to the distance to the top of the screen. In the second image camera is moved lower, which results in water height being greater than the distance to the top. In the third image the water is way higher than the middle of the screen, but its height is smaller that the distance to the top, so reflections work properly. Examples 2 and 3 do not feature reflections squashing, squashing the reflection results in a greater area being reflected which means that object's visible height must be smaller.

The scene contains a script that allows camera to move(WASD keys) and zoom(mouse scroll).

Impact effect/shockwave

Impact effect similar to the one produced by a shockwave during explosion. Can be used as a magic spell, terrain deformation effect.

Uses SCREEN_TEXTURE and offsets color using the circular gradient noise as a guide.

Click anywhere in the demo scene to produce the effect.

Dissolve

Dissolves the image using the noise as a guide.

Left click in the demo scene to dissolve sprite, right click to undo.

Magnifying glass

Magnifying glass effect. The script uses get_global_transform_with_canvas() to set the correct offset for the current position. When testing it on monitor with 1920x1080 resolution the magnification didn't work correctly if the display height was set above 850 and game window had border enabled. Without window border everything worked perfectly.

Changing edge distortion strength to positive/negative values results in simulating glass being concave/convex.

Use mouse wheel to zoom in/out.

Stealth cloak effect

Essentially this is a dissolve effect, that overlays one texture over another instead of simply changing the alpha.

Grass sway effect

A basic grass sway effect that modifies vertex positions to skew the object. In order for the effect to work properly modify offset to make object's origin to be at the bottom.

Circular fade out

Fades out to any point of the screen.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap