Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracker and guide: Update to Godot 4.3 #53

Open
10 of 50 tasks
NathanLovato opened this issue Sep 15, 2024 · 11 comments
Open
10 of 50 tasks

Tracker and guide: Update to Godot 4.3 #53

NathanLovato opened this issue Sep 15, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@NathanLovato
Copy link
Contributor

NathanLovato commented Sep 15, 2024

This issue focuses on porting the Godot Shaders repository from Godot 3 to Godot 4.3. The repository contains a collection of shaders and demo scenes for 2D and 3D games. The goal is to update the shaders and demo scenes to work with Godot 4.3, so that people can use them in their projects.

How to contribute

I saved a copy of the current shaders for Godot 3 in a branch. We can work directly on the main branch to port the project to Godot 4.3. Here's how you can help.

Every file needs to be checked and compared against the Godot 3 version to make sure it works correctly in Godot 4.3. The scenes, shaders, and GDScript files generally need to be updated to use the new features and syntax of the engine.

Below you will find a list of files that have not been updated yet. I will update the ones left to do as new files get updated and work in Godot 4.3.

Claiming files to update

If you want to help, please:

  • Check the files other people have claimed in the comments below.
  • List the files you'll work on in a new comment.

I'll update the list periodically as you claim some. This is to avoid having multiple people updating the same files in parallel.

Updating the files

To update the files, you'll need to:

  1. Fork the repository and create a new branch.
  2. Update the files to work with Godot 4.3. A handful of shaders will require good familiarity with shader programming to update. Most importantly the 3D water and the energy field ones. Others just need to be tested and updated to the new Godot 4 API. You can use this guide for a list of changes: Godot 4.3 shader API changes. The Godot 4.3 shading language documentation offers a reference for the shading language.
  3. Test the demo scene associated with a given shaders to make sure it works correctly.
  4. Create a pull request to merge your changes back into the main repository.

Here's a video running through the process of tracing where a shader is used and making some quick adjustments to it: Godot 4.3: How to update shaders.

Shaders and dependencies to update

Each checkbox represents a shader. If it's unchecked, it means that this shader and its dependencies haven't been updated yet. If a shader is claimed, you'll find the nickname next to the checkbox.

If you want to work on some shaders, please write a comment below listing the files you'll update.

Note: Be sure to check comments below for files others have claimed. I will not be able to update the list in real-time, so please coordinate with others to avoid working on the same files.

  • advanced_toon.gdshader
  • baked_sprite_glow.gdshader
  • clouds2D.gdshader
  • compose.gdshader
  • dissolve2D.gdshader (@Excoh)
  • dissolve2D_mask.gdshader (@Excoh)
  • dissolve.gdshader (@Excoh)
  • flag_3d.gdshader (@tetrapod00)
  • force_field.gdshader (@tetrapod00)
  • fresnel_crystal.gdshader (@tetrapod00)
  • gaussian_blur.gdshader (@Lexpeartha)
  • gaussian_blur_optimized.gdshader (@Lexpeartha)
  • glow_prepass.gdshader
  • interactive_snow.gdshader (@tetrapod00)
  • invert.gdshader
  • matcap.gdshader
  • outline2D_inner.gdshader
  • outline2D_inner_outer.gdshader
  • outline2D_outer.gdshader
  • outline3D.gdshader (@tetrapod00)
  • outline3D_smooth_normals_color.gdshader (@tetrapod00)
  • PalettSwap2D.gdshader
  • particle_bridge_particle.gdshader
  • particle_bridge_spatial.gdshader
  • perlin_noise.gdshader (@Lexpeartha)
  • pixel_perfect_outline3D.gdshader
  • pointilism.gdshader
  • random_noise.gdshader
  • rim_control.gdshader
  • shockwave_3d.gdshader
  • shockwave.gdshader
  • SpecularControl.gdshader
  • sphere_mask.gdshader
  • stencil_mask.gdshader
  • stylized_fire.gdshader (@albertok )
  • stylized_liquid.gdshader (@nan0m)
  • stylized_waterfall.gdshader
  • texture_mix.gdshader (@Leonardo-Rocha)
  • unlit_directional_tint.gdshader (@tetrapod00)
  • value_noise.gdshader (@Lexpeartha)
  • voronoi_noise.gdshader
  • water_2D.gdshader
  • water_3d.gdshader (@tetrapod00)
  • wind_grass.gdshader
  • wind_texture.gdshader
  • wind_uv.gdshader
  • xray_2d_mask.gdshader
  • xray_3d_mask.gdshader
  • VisualShader/shockwave.tres

Other tasks:

  • Restore visuals in DemoPickerUI.tscn: UI theme resource and background image (@jrassa)
@NathanLovato NathanLovato added the enhancement New feature or request label Sep 15, 2024
@NathanLovato NathanLovato pinned this issue Sep 15, 2024
@tetrapod00
Copy link
Contributor

tetrapod00 commented Sep 15, 2024

Claiming:

  • flag_3d.gdshader
  • force_field.gdshader
  • fresnel_crystal.gdshader
  • unlit_directional_tint
  • interactive_snow.gdshader
  • shockwave_3d.gdshader
  • water_3d.gdshader
  • outline3D.gdshader
  • outline3D_smooth_normals_color.gdshader

@Leonardo-Rocha
Copy link
Contributor

Leonardo-Rocha commented Sep 15, 2024

Claiming:

  • texture_mix.gdshader
  • (not listed) fixing Demo3DEnvironment.tscn

EDIT: seems like the Demo3DEnvironment was fixed already.

@Excoh
Copy link

Excoh commented Sep 16, 2024

Claiming:

  • dissolve2D.gdshader
  • dissolve2D_mask.gdshader
  • dissolve.gdshader

@Lexpeartha
Copy link
Contributor

Lexpeartha commented Sep 17, 2024

Claiming:

@jrassa
Copy link
Contributor

jrassa commented Sep 17, 2024

Claiming:

  • Restore visuals in DemoPickerUI.tscn: UI theme resource and background image

@tetrapod00
Copy link
Contributor

I don't have time to investigate right now, but I'd consider removing or replacing the toon shader currently included. The current shader uses viewports and has a visible frame of lag in the editor. In 4.x, there are approaches that work entirely within the shader and shader includes, without the need for viewports or a setup script in the scene.

One example of a cel shader that works without viewports is https://godotshaders.com/shader/complete-cel-shader-for-godot-4/ (https://github.com/eldskald/godot4-cel-shader), there are probably others and perhaps one has a compatible license and a creator who wants it included in this repo.

@tetrapod00
Copy link
Contributor

The water shader can also use some improvements, but that one is much more suited to being upgraded in place. I'm willing and able to make the water shader changes.

@albertok
Copy link
Contributor

Claiming stylized_fire - #63

@nan0m
Copy link
Contributor

nan0m commented Oct 18, 2024

claiming stylized_liquid -> also finished at #65

@NathanLovato
Copy link
Contributor Author

NathanLovato commented Oct 20, 2024

@tetrapod00 I had missed your suggestion about the advanced toon shader. It is an example of emulating deferred rendering in Godot. This approach is used to capture different light information in separate rendering channels (texture channels) to control the effect of various lights on different models at the material level.

The shader can be adapted to work with forward rendering as much of the logic is just common rendering techniques: anisotropy, metallic, etc.

I'm not sure how useful keeping an example of deferred rendering in Godot is, as it's partly working against the engine. Does someone have a lot of experience with forward vs deferred rendering and why you'd want to learn to emulate the latter? As we're doing this not only with aesthetics but also learning in mind, if there's no strong educational reason to learn how to do this in Godot, we can simplify the scene setup.

@tetrapod00
Copy link
Contributor

tetrapod00 commented Oct 20, 2024

I personally would not expect an example on how to emulate deferred rendering from this set of example shaders. Like you said, it's slightly working against the engine. I might expect some example of how to render out to a "custom buffer" for use in postprocessing effects, using a technique something like https://github.com/thompsop1sou/custom-screen-buffers. If there is such an example, ideally it would be separated from the toon shader example, since a good toon shader is possible without emulating deferred or using viewports. I still haven't looked closer at the existing toon shader though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants