Commit Graph

331 Commits

Author SHA1 Message Date
Chaosus
5320185f73 Fix typo in spatial_shader.rst 2024-10-25 14:13:23 +03:00
Yuri Rubinsky
bb40500d11 Merge pull request #10129 from Chaosus/shader_clip_space_far
Add `CLIP_SPACE_FAR` built-in description to spatial shaders
2024-10-25 14:09:14 +03:00
Chaosus
f93332bd75 Add CLIP_SPACE_FAR built-in description to spatial shaders 2024-10-25 14:04:23 +03: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
Chaosus
e3af8aa69b Add #error shader preprocessor directive description 2024-10-22 12:00:21 +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
a31b251589 Merge pull request #10107 from tetrapod00/canvasitem-shader-color-texture
Clarify COLOR and TEXTURE in CanvasItem shaders
2024-10-19 05:25:26 +02:00
tetrapod00
be84df8210 Clarify COLOR and TEXTURE in CanvasItem shaders 2024-10-18 10:55:46 -07: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
Matthew
41bb40b780 Merge pull request #9746 from tetrapod00/spatial-style-pass
Style consistency pass on Spatial, Fog, CanvasItem, Sky, Particle shader pages
2024-09-25 22:32:32 -04:00
tetrapod00
4e02ee375a Standardize style within spatial_shader.rst, etc 2024-09-20 12:36:09 -07:00
clayjohn
f890412082 Remove note about not supporting per-instance uniforms in the Compatibility backend 2024-09-10 14:59:19 -07:00
Matthew
4d42b74ebc Merge pull request #9766 from tetrapod00/advanced-postprocessing-example
Add example to advanced_postprocessing.rst
2024-09-07 12:31:14 -04:00
Farzad Besharati
909af5ce91 toggle off -> turn off
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-09-03 16:37:17 +02:00
Farzad Besharati
badeecb28a Add info to turn off preview sunlight before working with 3D shader lighting.
By default in Godot 4.3, preview sunlight is enabled and only disabled by a DirectionalLight3D being added to the scene. If you follow the guide and add an OmniLight3D, the preview sunlight stays enabled and causes a drastically different look.
2024-09-03 16:09:28 +02:00
Florent Guiocheau
54f368c4de Fix shader language matrix row/col convention 2024-08-27 16:44:02 +02:00
Sam Freed
689cc55682 Fix out of date comment about depth buffer 2024-08-21 16:40:58 -07:00
tetrapod00
d49dfae4c7 Add example to advanced_postprocessing.rst
Adds a complete example. Also removes an unneeded varying.
2024-08-18 00:16:05 -07:00
tetrapod00
f48748a05c Fix compile error in advanced_postprocessing.rst 2024-08-16 12:11:21 -07:00
Matthew
6a61ee7632 Merge pull request #9735 from tetrapod00/spatial-custom-uvs
Update spatial_shaders.rst with CUSTOM0,1,2,3 descriptions (used for extra UVs)
2024-08-14 19:50:27 -04: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
27a205a9cc Update spatial_shaders.rst with CUSTOM0,1,2,3 descriptions. 2024-08-14 11:24:46 -07: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
Max Hilbrunner
7503ecbc46 Merge pull request #9400 from skyace65/VisualShader
Update VisualShader page for 4.3
2024-08-08 00:45:27 +02:00
Max Hilbrunner
25e2ae64aa Merge pull request #9690 from Calinou/advanced-postprocessing-unshaded-render-mode
Recommend `unshaded` render mode for quad in Advanced post-processing
2024-08-01 19:09:20 +02:00
skyace65
9050e076e7 Update docs for new TileMapLayer node 2024-08-01 07:06:12 -04:00
Hugo Locurcio
fdf310da93 Recommend unshaded render mode for quad in Advanced post-processing
This prevents the quad from being affected by lighting, while also
improving performance.
2024-08-01 03:37:28 +02:00
skyace65
5712db6da1 Update VisualShader page for 4.3 2024-07-26 21:50:13 -04:00
Pavel Kotlyar
d1e3cfeff3 Fix Making trees tutorial
replace TRANSMISSION  with SSS_TRANSMITTANCE_COLOR
2024-07-25 20:25:26 +10:00
Hana - Piralein
88ee7438be Add description for custom vertex values
Co-Authored-By: Clay John <claynjohn@gmail.com>
2024-07-13 13:45:02 +02:00
谢天
42e8bda57c Clarify INV_VIEW_MATRIX and MAIN_CAM_INV_VIEW_MATRIX (#9544) 2024-07-09 21:14:16 -07:00
Yuri Rubinsky
a646c369c3 Fix some incorrect entries in shader built-ins 2024-06-19 09:45:40 +03:00
Yuri Rubinsky
bbf0b6ed6b Fix some incorrect entries in shader built-ins 2024-06-18 21:51:54 +03:00
Max Hilbrunner
204b091e81 Merge pull request #9466 from JeffHund/master
Add CSharp code example for SetShaderParameter()
2024-06-15 17:40:32 +02:00
Jeff
0ba9658f1f Add CSharp code example for SetShaderParameter() 2024-06-06 10:42:08 -05:00
A Thousand Ships
36e2351df2 Fix invalid indentation in various files 2024-06-06 16:16:45 +02:00
Max Hilbrunner
07b53d2253 Merge pull request #9326 from skyace65/ViewportTexture
Update using a viewport as a texture tutorial for 4.2
2024-06-05 06:23:33 +02:00
skyace65
74077e0edf Update using a viewport as a texture tutorial for 4.2 2024-05-18 21:23:24 -04:00
Max Hilbrunner
abda5a1cfa Merge pull request #9354 from Nitwel/patch-1
Entering transparent pipeline when reading ALPHA
2024-05-18 02:50:24 +02:00
jsjtxietian
f6ddd71040 Mention that user is responsible for POSITION value when it's written to anywhere in the shader 2024-05-14 11:46:41 +08:00
Nitwel
99da9754d1 Entering transparent pipeline when reading ALPHA
It's just a minor change, but I got confused on why the material was still using the transparent pipeline even though I removed all writes to ALPHA. So adding this should clarify things.
2024-05-10 14:27:25 +02:00
xXAdrXx
7c8f2cb5ef Add CAMERA_VISIBLE_LAYERS to spatial shader docs (#9244) 2024-05-01 18:33:58 +02:00
Max Hilbrunner
63a9187c35 Merge pull request #9282 from clayjohn/light_vertex
Add documentation for new LIGHT_VERTEX shader builtin
2024-04-30 04:14:23 +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