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.
* 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).
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.
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.
I tested it and it is upper left, not lower left.
This is the CanvasItem shader I used to test it:
shader_type canvas_item;
void fragment() {
if(distance(FRAGCOORD.xy, vec2(40, 40)) < 30.0)
COLOR = vec4(1,0,0,1);
else
COLOR = vec4(0,0,0,1);
}
This allows users to leave comments on pages that don't have
`:allow_comments: False` somewhere in the page's source.
Both manual and class reference pages can receive comments.
Index pages cannot have comments, as discussion should occur on "leaf" pages.
GitHub Discussions is used as a backend on the same repository. This means
that Discussions *must* be enabled on godotengine/godot-docs before this
commit is merged to `master`. Users can choose to use the "Custom" watch
mode if they don't want to get notifications for discussion updates,
but still get notifications for issue and pull request updates.
User comments are intended to be used for the following purposes:
- Add a clarification or correct something in the documentation,
without having to open a pull request. Contributors are encouraged to
take a look at discussions from time to time, and see if there's information
worth incorporating in the pages themselves. Don't forget to reply to
the comment when doing so :)
- Mention a workaround for a common issue.
- Link to useful third-party resources that are relevant to the current page,
such as tutorials or add-ons.
User comments should *not* be used for technical support. Other community
platforms should be used for that.
Page-to-discussion matching is done using the `pagename` Sphinx variable,
which is independent of the Godot version and documentation language.
Being independent of the Godot version allows keeping old comments
when the Godot version changes, while also allowing users from `/stable`
and `/4.1` to "see" each other in discussions.
See https://giscus.app for more information.