Amirtha Krishnan
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
tetrapod00
5994348764
Change all usages of "run-time" to "runtime"
2024-11-06 23:36:58 -08:00
tetrapod00
ed8b4c8099
Fix inaccurate note about shader global arrays
2024-10-30 02:17:08 -07:00
Hugo Locurcio
4679999c4d
Tweak constant example in Shading language to avoid referring to reserved PI
2024-10-29 15:15:43 +01:00
tetrapod00
58867df52b
Add note about uniform buffer size limit to Shading Language
2024-10-28 09:14:09 -07:00
Matthew
d7135355fa
Merge pull request #10143 from tetrapod00/large-world-coords-shader
...
Note limitation of shader world coordinates with large world coordinates
2024-10-25 18:52:51 -04:00
tetrapod00
e4d395de48
Note limitation of shader world coordinates with large world coordinates
2024-10-25 11:03:58 -07:00
Max Hilbrunner
cb2a53f881
Merge pull request #10119 from tetrapod00/shader-source-color
...
Clarify use of source_color in Shading Language
2024-10-25 13:27:41 +02:00
tetrapod00
7303e5733e
Clarify use of source_color in Shading Language
...
Rewrite section on using the source_color uniform hint. Content is mostly the same,
but is more clear.
Rename one instance of "shader hint" to "uniform hint".
Adds a section header for Uniform hints.
2024-10-24 21:03:17 -07:00
Chaosus
212ce6746d
Note about stage func/discard may be used in custom shader function
2024-10-24 17:35:09 +03:00
Max Hilbrunner
7061a2aa92
Merge pull request #9846 from Flarkk/shader_matrix_convention
...
Fix shader language matrix row/col convention
2024-10-20 04:13:42 +02:00
Max Hilbrunner
3a3fa0ee7c
Merge pull request #9939 from clayjohn/shaders-instance-uniform-note
...
Remove note about not supporting per-instance uniforms in the Compatibility backend
2024-10-18 05:46:55 +02:00
tetrapod00
b757d4019d
Add warning about uninitialized variables in shaders
...
Adds a warning note to shading_language.rst. GDShader does not
initialize local variables to 0, and an uninitialized local variable can
contain an arbitrary value.
2024-10-17 12:51:38 -07:00
Chaosus
c3feaed32a
Fix shader function overloading paragraph
2024-10-15 09:26:17 +03:00
Brian Huynh
67e37b547c
Add notes on bit depth for ints and floats ( #10028 )
...
* Added notes on bit depth for ints and floats
Added a small note about the bit depth of integers and floats in Godot's shading language as it is not explicitly stated anywhere.
The bit depth of integer and floats in GDscript and Godot's shading language are different, which can cause problems with lost precision in calculations when integers are set from GDscript as floats/ints in GDscript are 64 bits instead of 32 bits (the standard in GLSL ES 3.0).
While most are unlikely to run into problems due to this difference in bit depth, it can cause mathematical errors in edge cases. As stated by previous contributors, no error will be thrown if types do not match while setting a shader uniform. This includes GDscript floats being set as Godot shader floats (which may not be intuitive).
2024-10-04 03:30:24 +02:00
clayjohn
f890412082
Remove note about not supporting per-instance uniforms in the Compatibility backend
2024-09-10 14:59:19 -07:00
Florent Guiocheau
54f368c4de
Fix shader language matrix row/col convention
2024-08-27 16:44:02 +02:00
Matthew
603f4dcd1a
Merge pull request #9734 from tetrapod00/time-shader
...
Update description of shader variable TIME and add description to Fog, Particle, Sky, and Spatial shader pages
2024-08-14 19:47:02 -04:00
tetrapod00
19dc2ff818
Add description of TIME to shader pages, add label to global uniform header
...
Added/changed description of TIME in CanvasItem, Fog, Particle, Sky, and Spatial shader pages. Description now links to other relevant docs pages. Added a label to the global uniform header of shading_languge.rst, so it can be cross referenced from elsewhere.
2024-08-10 17:39:44 -07:00
Hugo Locurcio
48df572ab9
Add cubemap template images to Importing images
...
Images were generated using
<https://github.com/Calinou/godot-cubemap-generator >.
2024-08-08 19:34:33 +02:00
A Thousand Ships
36e2351df2
Fix invalid indentation in various files
2024-06-06 16:16:45 +02:00
Max Hilbrunner
800d867461
Merge pull request #9300 from Calinou/shading-language-doc-comments
...
Mention documentation comment support in Shading language
2024-04-30 04:13:22 +02:00
Radiant
348be5b0e0
make mat4 consistent with vec4 ( #9298 )
2024-04-29 11:48:13 -07:00
Hugo Locurcio
5d6dfe147d
Mention documentation comment support in Shading language
...
This also updates the shaders style guide accordingly.
2024-04-29 20:08:37 +02:00
Ricardo Buring
60e05c8ef4
Clarify per-instance uniforms are not supported in the Compatibility renderer
2024-04-05 18:20:49 +02:00
谢天
1c2a030049
Update textureQueryLevels to mention it returns 1 when the texture is unassigned
2023-12-22 14:32:13 +01:00
Hugo Locurcio
59842e9c35
Fix per-instance shader parameter classref link in Shading language
2023-12-16 22:08:28 +01:00
Hugo Locurcio
2b3c3c3ef4
Document source_color shader hint being relevant for 2D HDR
2023-11-01 19:25:04 +01:00
Hugo Locurcio
9773552257
Emphasize the importance of mipmaps for textureLod() in Screen-reading shaders
...
This also mentions that reading the normal/roughness buffer is only
currently supported in Forward+.
2023-10-26 02:32:37 +02:00
Hex-4
37a96ba407
Close #7690 (add info for shader hints and default values) ( #8117 )
...
* add comment for default values
* Add a line telling where the default value goes
---------
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2023-10-02 10:57:16 +02:00
Luna
0fe7ff833e
Fixed typos in several doc files ( #8002 )
...
* Fixed typos in
- c_sharp_differences.rst
- debugger_panel.rst
- gdextension_cpp_example.rst
- gui_using_fonts.rst
- openxr_hand_tracking.rst
- overview_of_debugging_tools.rst
- setting_up_xr.rst
- shading_language.rst
- the_profiler.rst
- your_second_3d_shader.rst
* Update tutorials/shaders/shader_reference/shading_language.rst
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
* PR Feedback
---------
Co-authored-by: Luna <2650849-Lunalicious@users.noreply.gitlab.com >
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2023-09-25 00:41:33 +02:00
Hugo Locurcio
df904137db
Fix incorrect usage of backticks in various pages
2023-07-14 19:31:01 +02:00
ffernn
2076e147c2
Added sky and fog shaders the the "Built-in variables" section
2023-06-28 17:47:02 +10:00
Hugo Locurcio
17e6a5f7bb
Mention function overloading not being supported in Shading language ( #6940 )
...
* Mention function overloading not being supported in Shading language
This also adds a performance note for `discard`.
---------
Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com >
2023-03-13 02:25:17 +01:00
Hugo Locurcio
9286f1b466
Remove references to removed GLES2 backend
...
- Update FAQ to remove issues resolved in 4.0, and add more advice
on resolving VRR flicker issues.
2023-03-11 02:55:30 +01:00
clayjohn
8bf41b6ef1
Document how to use screen space textures using uniform hints
2023-02-26 14:17:23 -08:00
Kenneth Lee
ad1d3072c4
Updates GLSL reference to contain GDScript types
...
The typing information was ultimately determined in this file where
Varients are converted and packed:
a51ca2beaf/servers/rendering/renderer_rd/storage_rd/material_storage.cpp (L42)
The documentation doesn't contain a reference to dealing with how
Packed[Float|Int]Arrays are interpreted, but should be a much better
starting point for new users.
2023-02-06 14:09:43 -08:00
Yuri Rubinsky
aed85898c4
Add derivative with precision shader functions
2023-01-28 09:33:48 +03:00
Winston
11ffa4bf33
Explain LOD arguments in Shading language ( #6593 )
...
Fixes https://github.com/godotengine/godot-docs/issues/3904
2023-01-14 00:41:15 +01:00
Hugo Locurcio
e2313a8395
Improve Shader preprocessor documentation ( #6563 )
2023-01-13 21:33:07 +01:00
Yuri Sizov
c5f066b27e
Merge pull request #6343 from alcomposer/patch-1
...
Replace the hint_albedo hint with source_color in the shading reference
2023-01-13 16:52:33 +03:00
J.M. de Jong
116cfdf9b7
fix imulExtended description
2023-01-08 18:38:02 +01:00
Yuri Sizov
6b9ec31b0a
Fix reported formatting issues and property references
2022-12-27 21:25:42 +03:00
J.M. de Jong
7fe43cfc8e
Update Shading language to refer to set_shader_parameter() ( #6515 )
2022-12-26 17:21:06 +01:00
Hugo Locurcio
319106ba2b
Document global and per-instance uniforms in Shading language ( #6414 )
2022-12-23 17:30:28 +01:00
Mara Huldra
0d1d5735ee
Replace all uses of hint_color/hint_albedo with source_color ( #6450 )
2022-12-02 23:17:35 +01:00
Arnaud Billon
329ed4c0a0
Update _anisotropic hint suffix in Shading language ( #6447 )
2022-12-02 18:05:59 +01:00
alcomposer
66c6e38f46
hint_albedo is depreciated
...
`hint_albedo` is no longer used, it is `source_color` to convert the source colorspace to linear.
Add example of `source_color` for sampler2D
2022-10-27 16:02:21 +10:30
Max Hilbrunner
5bb50c07b6
Nuke old renderer comparison page
2022-10-16 00:01:21 +02:00
Yuri Rubinsky
f1c0ab12eb
Add samplerCubeArray type to the list of supported shader types.
2022-08-14 09:25:07 +03:00