mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
- Move all demo projects that don't require Forward+/Mobile-only features to the Compatibility rendering method. This improves performance significantly on low-end devices and ensures visuals are identical to a web export of the demo. - Set deadzone on all inputs to 0.2 for better gamepad usability. - Remove reliance on `default_env.tres` to use built-in Environment resources in the main scene instead (which follows the preview environment workflow). - Remove notices pointing to GDNative or VisualScript, since both were removed in 4.0. - Various bug fixes and usability tweaks to 10+ demos.
38 lines
1.6 KiB
Markdown
38 lines
1.6 KiB
Markdown
# Procedural Materials
|
|
|
|
This demo includes procedurally generated materials with 3 different techniques:
|
|
|
|
- **[NoiseTexture2D](https://docs.godotengine.org/en/stable/classes/class_noisetexture2d.html):**
|
|
Built-in class that generates images on the CPU based on
|
|
noise patterns (such as Simplex or Cellular). This is suited for static
|
|
textures only. Texture generation is done asynchronously and is faster than
|
|
using scripting, since the noise algorithms are implemented in C++ in the
|
|
engine.
|
|
|
|
- **Scripting:** Uses the
|
|
[Image](https://docs.godotengine.org/en/stable/classes/class_image.html) class
|
|
to procedurally generate an
|
|
[ImageTexture](https://docs.godotengine.org/en/stable/classes/class_imagetexture.html)
|
|
on the CPU. This is suited for static textures only. This approach is more
|
|
flexible than NoiseTexture2D, but is slower to generate textures. Once the
|
|
texture is generated, rendering performance is identical to NoiseTexture2D.
|
|
|
|
- **Shaders:** Uses a 2D shader on a
|
|
[ColorRect](https://docs.godotengine.org/en/stable/classes/class_colorrect.html)
|
|
node that matches a
|
|
[Viewport](https://docs.godotengine.org/en/stable/classes/class_viewport.html)'s
|
|
size with the resulting
|
|
[ViewportTexture](https://docs.godotengine.org/en/stable/classes/class_viewporttexture.html)
|
|
applied to a material. This is updated on the GPU in real-time, and is most
|
|
suited for animated textures. This approach can also be used for static
|
|
textures, with a lower performance overhead since the texture doesn't need to
|
|
be updated every frame.
|
|
|
|
Language: GDScript
|
|
|
|
Renderer: Forward+
|
|
|
|
## Screenshots
|
|
|
|

|