Giter Site home page Giter Site logo

gdquest-demos / godot-shaders Goto Github PK

View Code? Open in Web Editor NEW
2.8K 65.0 164.0 23.74 MB

A large library of free and open-source shaders for the Godot game engine. Here, you'll get 2D and 3D shaders with playable demos.

License: Other

GDScript 45.28% GLSL 54.72%
godot-shader shaders game-assets godot-engine godot-shaders shader-secrets game

godot-shaders's Introduction

Godot Shaders

project banner

Godot Shaders is a repository of Free shaders, part of which we made for our course Godot Shader Secrets.

โžก Follow us on Twitter and YouTube for free game creation tutorials, tips, and news! Get one of our Godot game creation courses to support our work on Free Software.

2D dissolve shader, showing a character burning

The shaders

Here's a list of available shaders and demos.

3D Shaders

Stylized fire shader

  • 3D dissolve
  • 3D outline
  • 3D shockwave
  • 3D stylized fire
  • Advanced toon shader
  • Force field
  • Stencil mask (impossible cube)
  • Stylized fire
  • Stylized bottled liquid
  • Interactive snow
  • Unlit directional tint
  • Texture mixing methods
  • Stylized waterfall shader
  • Spherical mask shader
  • Particle bridge: process to canvas_item/spatial communication

2D Shaders

2D water shader with light support

  • 2D baked-in-texture glow control
  • 2D clouds: noise-based cloud shadows cast over the game world
  • 2D dissolve
  • 2D glow
  • 2D outline
  • 2D palette swap
  • 2D reflection
  • 2D water for side-scrolling games
  • 2D water in top-down view
  • 2D x-ray (masking)

Screen shaders

  • Gaussian blur
  • Inverted colors
  • Pointilism
  • Screen distortion (2D shockwave)

How to use

You can find the shaders in the Shaders/ directory. Most shaders come with a demo scene. All demos are in the Demos/ directory.

The Intro/ directory contains an intro animation to the shader pipeline, that we use in our shader course.

Contributing

Contributors are welcome!

If you encounter a bug, please open an issue.

If you want to contribute to the project, for instance by fixing a bug or adding a feature, check out our:

  1. Contributor guidelines.
  2. GDScript style guide

Credits

Stylized fire adapted from a Unity tutorial by @minionsart.

Licenses

This project is dual-licensed:

  • The source code is available under the MIT license.
  • Art assets (images, audio files) are CC-By 4.0. You can attribute them to GDQuest and contributors (https://www.gdquest.com/).

godot-shaders's People

Contributors

arnklit avatar bramreth avatar coppolaemilio avatar eh-jogos avatar johnnygossdev avatar nathanlovato avatar nonunknown avatar qbieshay avatar razoric480 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-shaders's Issues

Improve background of 2D demos

A temporary background was added as in #1 , just to make sure it worked. The actual sprucing up with a nice background can now occur.

Making them inherit from a common ancestor might be a bit trickier, though. Often times, the background is part of the 'main scene view' rather than the demo.

Side-view 2D water shader

The shader is already available: see WaterSidescroll2DDemo

Features:

  • Reflections
  • UV deformation affecting both reflections and water
  • Transition between reflection and water
  • Perspective deformation
  • Parallax mapping
  • Shading from parallax
  • Make it so the top edge isn't so sharp - displace the pixels there too
  • Light support (normal maps)
  • Clean up code

Unify the look of 3D scenes

The 3D scenes are lacking some coherent and quality world environment. As for the 2D scenes (#1 ) we could have a base 3D demo scene they all inherit (or a template with reusable components).

Add a text description in the demos

What the shaders do and how they work isn't always self-explanatory, especially as some are there for learning purposes or are low-cost variants of more expensive real-time effects, like the pre-baked glow.

We could use a UI component that gives some info about the shaders, available in all demo scenes. It can be part of a base scene that all demos inherit, or exist as a reusable component. See #1 and #2

Enhancement: Make SphereMask shader work with object material instead of a color

Hi there!

The SphereMask is simply awesome but what it makes it a bit hard to use in a real project is the fact that this shader applies a color over the hidden object instead to display the object material (with its textures)

Is possible to modify or create a different one that displays the object material instead of a color?

Keep up your amazing work!

Add a background to 2D demo scenes

Most demo scenes use the default grey as a background. We could have a skeleton demo scene they all inherit with a nice little background.

The foam in the 3d water shader is shown incorrectly

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?
Depth isn't calculated correctly for object near water. I marked the problem on the attached image:
Screenshot from 2020-08-10 22-22-11

What is the expected behavior?
There shouldn't be any foam around objects, that aren't in the water.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Just add any MeshInstance to a 3d water demo scene and look at water with camera behind this node.

4.0 version

Since Godot 4 has been released and has lots of differences, any plan on update this project up to Godot 4?

Add a 2D toon shader

Add a gradient-mapping shader for 2D sprites. It should support normal maps and lighting (that's provided out of the box by Godot).

duplicate file causing directory mismatch on Windows

I'm submitting a...

  • Bug report.

Bug report

What is the current behavior?

Current repo contains two similarly named files
/Shaders/compose.shader
/Shaders/Compose.shader

This is not an issue on linux. On Windows, only Compose.shader is shown in the directory. As I use SyncThing to manage certain aspects of my projects on several platforms, this is causing a issue as "compose.shader" becomes unavailable to sync.

What is the expected behavior?

Ideally a single file, or at least differently named files for compatibility with synchronisation software.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

Checkout repo in a folder that's shared by SyncThing on a linux system.
Sync folder with SyncThing on a Windows system.

Other

Other information

For compatibilities sake, please don't use file names with only capitalisation as differentiator.

Add a 2D reflection shader

Add a shader to create 2D reflections of a viewport, e.g. on a body of water. A must for reflective surfaces like water, ice, mirror, a metallic floor...

indexing color, palette swap, indexed palette swapping

I'm submitting a...

  • Bug report.
  • Feature request.

Feature request

Describe the problem you're trying to solve.
it would be nice to have the following shaders..

  • Indexed Color allows you to limit every pixel on screen to a palette.
  • Palette Swap allows you to swap colors that are on screen for different colors.
  • Indexed Palette Swap indexes the colors to the original palette and then swaps them depending on order.

I would just suggest that it be made a shader

Tell us which solutions you've explored, the solution you would pick, and why you think it would be the best for everyone.
I am currently trying to get help on the discord to implement a Indexed Color shader but it might be nice to beable to swap colors later

I think it would be good for retro games regardless if they are 2d or 3d

3D shockwave

This is a user request. Creating a shockwave that deforms 3D geometry. I would add that it'd be nice to have a shockwave that deforms the environment in general. Which means we would probably need meshes with quite a bit of subdivisions, but also have them all share the same shader I guess?

Anyway, this kind of world effect would be interesting, I think it can be generally useful: how to make the player affect its environment.

ShockwaveDemo: mask does not update with the shockwave

The Mask node, that displays a black-and-white, 2D representation of the shockwave's height-map, does not animate with the actual shockwave.

This is because it doesn't use the same material as the shockwave. But using the same material doesn't work either. It gives me a pure white rectangle.

Add most useful blending mode shaders

This is a request to contribute, just to add a bunch of Shaders that I create while working with Godot to simplify things for others looking for Godot Shaders in the future, rather than having to refer to multiple repositories.

They will mostly be pretty simple, starting with Overlay:
Left: Original Brick / Right: Gloss Sprite with Overlay Shader added
image

Shaders suggestion

I'm submitting a...

  • [x ] Feature request.

Feature request

I suggest adding several shaders:

Very useful effects for creating a visual atmosphere. Thanks

Outline2DDemo: Make the outline appear on mouse hover?

The demo uses an animated cursor that goes over the characters. Area2D should be able to detect mouse hover from the user so I'd like to suggest we use that kind of user interaction when we can, to make the demos more interactive.

Outline Demo not generating complete outlines

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?
The Outline3D demo scene creates incomplete outlines in Godot v3.2.2. Only 2 of the 5 shapes actually have a complete outline with others showing parts of the outline generated from surfaces, which don't link up properly.

What is the expected behavior?
The Outline3D demo should create actual outlines.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Open the Demo Project in Godot v3.2.2.
  2. Run Outline3DScene.tscn
  3. Hover over the shapes

Feature request

Describe the problem you're trying to solve.

Tell us which solutions you've explored, the solution you would pick, and why you think it would be the best for everyone.

Other

Other information

Dissolve2D demo crashes on launch

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?
The Dissolve2D shader demo crashes on launch due to an "Invalid get index" error in Particles2D.gd.

# ...
func _physics_process(_delta: float) -> void:
	var data := emission_mask.get_data().data
	var width: int = data.width
	var height: int = data.height
	var raw: PoolByteArray = data.data

	var positions := PoolVector2Array()

	for x in width * height:
		for y in height:
			var idx: int = (y * width + x) * 4
			var byte: int = raw[idx] # <--- This line causes the error
			if byte > 128:
				positions.append(Vector2(x, y) * 8 - position)
	# ...	

Steps to reproduce

  • Run the Dissolve2D shader scene

GDQuest is just garbage

@NathanLovato This post is in response to the certain silly and worthless guys at GDquest, and some of its slave worthless members (including razvan)
Shame on them, cheap slaves. Shame on them cheap loser slaves for promoting dumpsters in socities called "universities" [dumpsterversities]. Shame on razvan for boasting about his stupidity. How extremely dumb and childish you are for promoting those ultra racist clowns. GDquest and godot and open-source have no potential and are a complete failure. Death to "univeristies". Death to every low life lower clown who uses those stupid and childish and pathetic "prefixes" when mentioning first name. Death to open source. Death to GDQuest. Death to godot. Hope you clown devs have a tragic life and painful death.

And another thing....
Stop making lies about real Engineering. Engineering has nothing to do with sitting behind a keyboard and writing code or games. Engineering is a real subject. Engineering means designing and building real mechanical systems, like vehicular engines and turbojets. Sound and software devs are the biggest liars. Game/software devs have absolutely nothing to do with engineering, they are just being stupid wannabe liars. They will never be engineers, not even close. In fact, they don't even know what it takes to be an engineer. None of you are engineers, and you'll never even be close. So stop being disrespectful to real engineers (mechanical engineering is real engineering, and nothing else)

Mechanical Engineering is the ONLY ENGINEERING. Period.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.