Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information