Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C# example to Creating movies #9816

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion tutorials/animation/creating_movies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ This feature tag can also be queried in a script to increase quality settings
that are set in the Environment resource. For example, to further improve SDFGI
detail and reduce light leaking:

::
.. tabs::
.. code-tab:: gdscript

extends Node3D

Expand All @@ -296,6 +297,24 @@ detail and reduce light leaking:
get_viewport().world_3d.environment.sdfgi_min_cell_size *= 0.25
get_viewport().world_3d.environment.sdfgi_cascades = 8

.. code-tab:: csharp

using Godot;

public partial class MyNode3D : Node3D
ShawnHardern marked this conversation as resolved.
Show resolved Hide resolved
{
public override void _Ready()
{
if (OS.HasFeature("movie"))
{
// When recording a movie, improve SDFGI cell density
// without decreasing its maximum distance.
GetViewport().World3D.Environment.SdfgiMinCellSize *= 0.25f;
GetViewport().World3D.Environment.SdfgiCascades = 8;
}
}
}

.. _doc_creating_movies_recording_at_higher_resolution:

Rendering at a higher resolution than the screen resolution
Expand Down