Skip to content

Commit

Permalink
Merge pull request #9816 from ShawnHardern/update-creating-movies-csharp
Browse files Browse the repository at this point in the history
Add C# example to Creating movies
  • Loading branch information
AThousandShips authored Aug 23, 2024
2 parents 20f5a27 + 6475321 commit c0d608c
Showing 1 changed file with 20 additions and 1 deletion.
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
{
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

0 comments on commit c0d608c

Please sign in to comment.