Commit Graph

42 Commits

Author SHA1 Message Date
skyace65 c83718624f Update links to outdated asset library demos
Update links to outdated asset library demos

Co-authored-by: Max Hilbrunner <m.hilbrunner@gmail.com>
2024-04-07 16:59:43 +02:00
Bastiaan Olij 5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
Yuri Sizov cc0eebd9d8 Validate `code` tags for class and member references
This commit also adds means to manually disable warnings
in `code` tags where it's a false positive with the new
`skip-lint` attribute.

Warnings are now enabled on CI to prevent future errors.
2023-10-03 15:48:31 +02:00
Rémi Verschelde e00dc3c719
Merge pull request #75806 from bcmpinc/issue-61174
Fix Camera3D `project_*` methods not accounting for frustum offset
2023-07-07 16:01:47 +02:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
Bauke Conijn 47e63bc55f Fix Camera3D project_* methods not accounting for frustum offset
This does not fix Camera3D::project_ray_normal().
Adds Camera3D::get_camera_projection() and exposes it to GDScript
2023-06-20 20:45:50 +02:00
Hugo Locurcio 40bf95ca8e Document GI techniques ignoring VisualInstance3D and Camera3D layers
This also improves documentation for a few other properties in those classes.
2023-06-02 15:36:57 +02:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
clayjohn 385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Max Hilbrunner deb3f8eb3b
Merge pull request #64407 from aaronfranke/fix-camera-size-doc
Fix incorrect Camera3D size documentation
2022-08-17 14:51:07 +02:00
Aaron Franke 40f37e697c
Fix incorrect Camera3D size documentation 2022-08-14 15:57:19 -05:00
Andy Maloney d32803fdd6 [doc] Use "param" instead of "code" to refer to parameters (7) 2022-08-12 13:19:48 -04:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Hakim 60677c4e95 Remove rect_ prefix from control properties when keyframing 2022-08-05 16:04:51 +02:00
Hugo Locurcio c3720e2381
Document Camera3D's frustum offset property requiring Frustum projection 2022-08-03 02:46:12 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Zak Grumbles 349c750b18 Improve documentation for Camera3D's `current` member
* Added additional information to the camera documentation to explain
  how the 'current' attribute behaves when multiple cameras are in a
  scene.
2022-07-17 11:29:59 +02:00
Rémi Verschelde a2140c4bf8
Merge pull request #59596 from Calinou/doc-camera-project-ray-normal-origin 2022-05-16 15:03:57 +02:00
Hugo Locurcio 2252663163
Allow `size` values as low as `0.001` in Camera3D's orthogonal/frustum mode
This allows for lower field of view (or higher zoom) in orthogonal
and frustum camera modes.

The property hint also allows setting the size with greater precision.
2022-04-08 18:49:45 +02:00
Hugo Locurcio fbec10179a
Improve documentation for `Camera3D.project_ray_{normal,origin}`
This mentions that internally, the inverse camera projection is used
to perform projections.
2022-03-27 20:31:18 +02:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Haoyu Qiu 85c136bd07 Fix various misused code tag in classref 2021-12-02 17:08:52 +08:00
reduz b11bb595d1 Remove ClippedCamera3D
* Usage was always confusing for users
* The ability to generate a pyramid shape was moved to Camera3D
* SpringArm3D now casts using the camera pyramid shape if no shape is supplied.
2021-10-04 10:46:49 -03:00
Max Hilbrunner 7c689fb384
Merge pull request #49038 from madmiraal/fix-docs-3407
Clarify documentation of Camera3D.get_camera_transform()
2021-09-16 00:21:39 +02:00
PouleyKetchoupp 989acbbe81 Uniformize layer names, script methods and documentation
- Back to 1-based layer names to make it clearer in editor UI
- Layer bit accessors are renamed to layer value and 1-based too
- Uniform errors and documentation in render and physics
- Fix a few remaining collision_layer used in place of collision_mask
2021-08-12 08:06:42 -07:00
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Nicholas Huelin 9787e631aa Fix miscellaneous doc typos and inconsistencies
This pull request fixes an assortment of typos, improves conciseness, and enhances clarity.
2021-07-22 14:01:39 -04:00
Josh Chandler 879f84d8f8 add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code
* simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results
* rebased to current godot master
2021-07-03 15:08:17 -04:00
Michael Alexsander Silva Dias 0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Aaron Franke bd40474bd6
Add is_position_in_frustum to Camera3D 2021-06-14 12:03:18 -04:00
Aaron Franke 0ac4051c00
Update documentation for Transform3D 2021-06-03 07:30:01 -04:00
Marcel Admiraal 963d8dad97 Clarify documentation of Camera3D.get_camera_transform() 2021-05-24 17:48:39 +01:00
Paul Joannon 8455e901f3
class reference proofreading 2021-03-19 13:21:20 +01:00
Marcel Admiraal ecf8ae5bcf Rename Camera3D near and far getters and setters
Renames:
- get_znear() -> get_near()
- set_znear() -> set_near()
- get_zfar() -> get_far()
- set_zfar() -> set_far()
2020-12-20 13:46:57 +00:00
Hugo Locurcio 7ae487d2bb
Increase the default Camera Zfar to 4000
This makes it possible to view far away objects without
having to tweak any settings. This results in a more usable
editor when working on large-scale levels.

This change should have no impact on performance, but note that
Z-fighting will be visible at a distance. This can be made less
visible by increasing the Znear value (however, doing so will cause
nearby surfaces to disappear).

This change was also applied to the editor, but it will only
apply to newly created scenes.

This also changes the default camera settings in the glTF importer
to match the Camera node's defaults.
2020-12-19 14:52:44 +01:00
Hugo Locurcio b3a6937c0c
Document hiding a Control when its reference point is behind the camera
See https://github.com/godotengine/godot/issues/1725.
2020-10-27 17:37:03 +01:00
Aaron Franke 439be614f4
Link to demos from within the class reference 2020-10-01 23:57:21 -04:00
Hugo Locurcio 9e9410bd3d Document the Camera3D's `effects` property
This makes the Camera3D documentation 100% complete.
2020-05-15 14:38:26 +02:00
Hugo Locurcio ccc4f3899c
Increase the default Camera3D field of view to 75
A vertical FOV of 75 degrees is roughly equivalent to a 91 degree
horizontal FOV on a 4:3 display (~107.51 degrees on 16:9),
which is close to the typical default FOV used in PC games.

Note that this doesn't apply to the in-editor camera which keeps its
FOV to 70. This is because it doesn't display in fullscreen;
its viewport only displays in the center of the editor (roughly).
This means the viewport won't cover the viewer's eyes as much. Therefore,
the editor camera FOV should be slightly lower to account for this.

Since this changes the default value, this may break existing projects
slightly.

For the record, this was already done in
https://github.com/godotengine/godot-demo-projects/pull/260
for the official demo projects.
2020-05-01 14:03:27 +02:00
Rémi Verschelde eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00