251 Commits
Author SHA1 Message Date
TelePete f2023307bc Fix error in shader_functions abbr popup
When hovering over vec_uint_type the popup claims that it can accept a float instead of a uint. This pr fixes this error. The top of the page states correctly that it accepts a uint, uvec2, uvec3, or uvec4.
2025-11-10 20:13:38 +01:00
Hugo Locurcio aff19fe068 Document textureSize() should be avoided in Built-in functions
For performance reasons, it's best to pass the texture size
as a uniform instead.
2025-11-05 00:43:15 +01:00
Hugo LocurcioandQbieshay 9377e35451 Document Depth Test and Stencil features in Standard Material 3D and Spatial shader
Co-authored-by: Qbieshay <cislaghi.ilaria@gmail.com>
2025-10-16 16:51:07 +02:00
Max Hilbrunner f6b40a054e Merge pull request #11352 from Calinou/remove-old-version-references
Remove old Godot version references to simplify documentation
2025-10-11 12:45:38 +02:00
Nelson Sexton f9730cf63f Merge pull request #11262 from SDGNelson/patch-1
Add Z_CLIP_SCALE to Spatial Shaders reference vertex built-ins
2025-10-09 13:45:16 +02:00
12baca60f0 Edit per-instance texture array workaround (#11350)
* Edit per-instance texture array workaround

---------

Co-authored-by: Jaiden Ortiz <jaidenortiz@Jaidens-MacBook-Pro-2.local>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-10-09 13:20:52 +02:00
A Thousand Ships 2c9ada62c4 Shader reference proofreading 2025-10-08 12:56:12 +02:00
Hugo Locurcio b3cbe5f777 Remove old Godot version references to simplify documentation
This follows the documentation writing guidelines, specifically
the "When to refer to a specific Godot version" section.

This also removes warning blocks for a known issue that was resolved in Godot 4.5.
2025-10-07 19:01:12 +02:00
Ted Gignac 4a8e23586a Add details on the shader's eye position built-ins
Changed descriptions for CAMERA_POSITION_WORLD and EYE_OFFSET to benefit XR developers.
I decided to make this pull request because my dad spent a while trying to get the eye positions correct, eventually finding  that CAMERA_POSITION_WORLD is the same for both eyes, and later that the EYE_OFFSET is not in world space.
My dad and I were almost led to believe that the perspective artifacts we saw with our custom shader were due to an optimization in the headset, and that we would have to work around it in our game, but it has since been fixed.
2025-09-26 10:56:03 -04:00
Max Hilbrunner bbb393cfc7 Merge pull request #11201 from stuckupfool/patch-1
Update shading_language.rst
2025-09-13 04:06:19 +02:00
Hugo Locurcio 0fc73a7c0d Document REGION_RECT canvas shader built-in
This was added in 4.5 to better accomodate Sprite2D with regions enabled.
2025-08-22 18:18:33 +02:00
Justin Hertel 7a479aab52 Update shading_language.rst
Updated warning on per-instance shader uniforms indicating that "instance uniform arrays" are not supported
2025-08-13 15:04:07 -04:00
Adam Sawicki 0e4fee7988 Fix shader_functions.rst - description of pack/unpack for Snorm/Unorm functions 2025-07-28 12:53:34 +02:00
Danil Alexeev 3946ede7aa Replace remaining uses of shorthand codeblock syntax, add CI check 2025-07-25 16:20:16 -04:00
A Thousand Ships 92cd36b50e Various grammar and spelling fixes 2025-06-23 16:37:26 +02:00
Hugo Locurcio 8a6ad4c926 Replace uses of shorthand codeblock syntax to avoid issues with localization
Previously, many paragraphs in the documentation used `::` at the end of a line
as a replacement for a single colon (and `::` on the following line).
Due to this, the `::` was part of the extracted string for localization.
Weblate also showed a warning about the trailing `::`, as it's not
normally expected to be there.

This change requires translators to revalidate all modified strings.
However, considering many of those have broken code blocks due to translators
replacing `::` with `:`, it can be a good idea.

This also adds documentation writing guidelines for code blocks and admonitions.
This commit does not modify existing admonitions in any way (as this would
lead to a much larger diff, and require more localizable text to be revalidated
by translators).
2025-05-30 02:02:30 +02:00
Chaosus 916c65fe71 Few fixes for shader's built-in methods 2025-05-01 14:45:29 +03:00
Gio Aleman c910af068e Minor formatting fix 2025-04-16 21:37:34 -04:00
Matthew 7329907b4a Merge pull request #10834 from pixcai/patch-1
Fix description of `shadows_disabled` shader render mode
2025-04-06 19:25:37 -04:00
Hugo Locurcio 93963ab701 Document support for 2D per-instance uniforms in Shading language (#10749)
* Document support for 2D per-instance uniforms in Shading language
2025-04-05 13:22:18 -04:00
pixcai ba72293880 Update spatial_shader.rst 2025-04-04 17:14:33 +08:00
Max Hilbrunner e2c795c03d Merge pull request #10680 from Calinou/ci-check-urls
GitHub Actions: Check URLs using lychee
2025-02-19 19:53:49 +01:00
Hugo Locurcio 51a597f7b6 GitHub Actions: Check URLs using lychee
This makes it possible to be aware of dead links and replace
them with other resources (such as archived versions) as
soon as possible.
2025-02-17 15:56:09 +01:00
GlitchCode24andtetrapod 619edd2cae Update tutorials/shaders/shader_reference/shading_language.rst
Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2025-02-15 22:56:43 +02:00
GlitchCode24 99b4f2494c Add else if 2025-02-15 22:47:20 +02:00
Matthew ea1b882aa7 Merge pull request #10606 from tetrapod00/first-3d-update
Improve First 3D shader tutorial
2025-02-04 17:35:24 -05:00
tetrapod00 287ad02f83 Improve First 3D shader tutorial 2025-02-02 14:53:13 -08:00
tetrapod00 858c663ab1 Add note to use varyings to access builtins in shader pages 2025-02-02 13:00:12 -08:00
Matthew 0c82320d79 Merge pull request #10558 from tetrapod00/shader-tweaks
Improve shading language page
2025-01-28 20:08:31 -05:00
tetrapod00 a2d2c07aee Improve shading language page 2025-01-28 00:36:30 -08:00
Hugo Locurcio e43dd0821c Update list of spatial shader render modes for Godot 4.3
This also improves the documentation for existing render modes.
2025-01-25 18:42:57 +01:00
Ben d251fe8442 Divide pi out of light color
This should have been updated in https://github.com/godotengine/godot-docs/pull/7568
2025-01-12 20:13:49 -08:00
Max Hilbrunner 70a32c6950 Merge pull request #10261 from tetrapod00/improve-uniform
Reorganize and improve shader Uniforms section
2025-01-03 10:47:26 +01:00
Max Hilbrunner 0ebcd118d2 Merge pull request #10315 from tetrapod00/shader-global-clarify
Explain difference between global shader uniforms and global scope in shaders
2025-01-03 10:30:05 +01:00
tetrapod00 c4d3aa134a Standardize RST header syntax 2024-12-29 13:44:09 -08:00
Max Hilbrunner 8c18786cc1 Merge pull request #10409 from tetrapod00/no-simply
Simply remove some words
2024-12-15 17:31:18 +01:00
tetrapod00 bd25f5813a Simply remove some words 2024-12-14 20:36:17 -08:00
tetrapod00 0da4dbe145 Add self links to shader functions page 2024-12-13 22:17:49 -08:00
Ryan 7c1eefda90 TIME is affected by time_scale 2024-12-07 21:14:22 -05:00
tetrapod00 55cd8723fc Improve Shader functions page 2024-12-05 13:09:40 -08:00
Max Hilbrunner bac98a0aa2 Merge pull request #10344 from tetrapod00/shader-function-modified
Note that shader function descriptions are modified from OpenGL docs
2024-11-30 01:55:01 +01:00
tetrapod00 f40128b9ba Note that shader function descriptions are modified from OpenGL docs 2024-11-29 15:53:13 -08:00
tetrapod00 f2ce3eee91 Standardize renderer names and terms 2024-11-29 13:26:48 -08:00
Chaosus b1190d5371 Add SCREEN_UV shader built-in to spatial light shader 2024-11-26 21:43:29 +03:00
tetrapod00 17bb2f368c Explain difference between global shader uniforms and global scope in shaders 2024-11-25 10:36:52 -08:00
tetrapod00 3ee7142208 Reorganize and improve shader Uniforms section 2024-11-23 15:43:56 -08:00
Chaosus ef7e5e39be Remove extra paragraph textureQueryLod from shader_functions.rst 2024-11-23 12:32:44 +03:00
Chaosus c46c219825 Add samplerExternalOES type to variable types of shading language 2024-11-21 23:42:55 +03:00
c10b857b54 Improve shader function descriptions (#9338)
- Move built-in shader function descriptions from Shading Language
  to a new page, with a format like the class reference.
- Shader built-in functions are sorted by category, each with a summary
  table and then full descriptions of each function, with parameters, 
  returns, and links to the official Khronos docs.

---------

Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: ashbygeek <daniel.ashby@sern.blueskydevops.net>
Co-authored-by: Yuri Rubinsky <chaosus89@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2024-11-19 22:41:36 -08:00
Amirtha KrishnanandA Thousand Ships 1b51bb7b1a Add documentation for hint_enum uniform in shading_language.rst (#9841)
* Adding documentation for ``hint_enum`` uniform in shading_language.rst

Added explanation regarding ``hint_enum`` behaviour and usage in Uniforms section.
Also added a row in the Uniforms section table to reflect this new hint type

This PR is documentation regarding : godotengine/godot#94324

---------

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-11-19 16:26:46 -08:00