General proofreading (#1262)

* General proofreading for grammar and spelling
* General formatting
* Addition of appropriate literals where appropriate, i.e. `&"foo"` for `StringName` cases and `^"foo/bar"` for `NodePath` cases
This commit is contained in:
A Thousand Ships
2025-10-11 10:39:59 +02:00
committed by GitHub
parent a01005f397
commit 0343cedd48
180 changed files with 721 additions and 692 deletions

View File

@@ -12,7 +12,7 @@ can try both options to compare the time it takes to generate the heightmap on
the CPU and GPU respectively.
For smaller noise textures, the CPU will often be faster, but the larger the
gains are by using the GPU. On a PC with a NVIDIA GeForce RTX 3060 and
gains are by using the GPU. On a PC with an NVIDIA GeForce RTX 3060 and
11th-generation Intel Core i7 processor, the compute shader was tested to be
faster for textures 1024×1024 and larger.

View File

@@ -60,11 +60,11 @@ func _render_callback(p_effect_callback_type: EffectCallbackType, p_render_data:
# Create push constant.
# Must be aligned to 16 bytes and be in the same order as defined in the shader.
var push_constant := PackedFloat32Array([
size.x,
size.y,
0.0,
0.0,
])
size.x,
size.y,
0.0,
0.0,
])
# Loop through views just in case we're doing stereo rendering. No extra cost if this is mono.
var view_count: int = render_scene_buffers.get_view_count()

View File

@@ -151,11 +151,11 @@ func _render_callback(p_effect_callback_type: EffectCallbackType, p_render_data:
# Create push constant.
# Must be aligned to 16 bytes and be in the same order as defined in the shader.
var push_constant := PackedFloat32Array([
size.x,
size.y,
0.0,
0.0,
])
size.x,
size.y,
0.0,
0.0,
])
# Make sure we have a sampler.
if not nearest_sampler.is_valid():

View File

@@ -41,10 +41,10 @@ func _ready() -> void:
# Get our texture from our material so we set our RID.
var material: ShaderMaterial = $MeshInstance3D.material_override
if material:
material.set_shader_parameter("effect_texture_size", texture_size)
material.set_shader_parameter(&"effect_texture_size", texture_size)
# Get our texture object.
texture = material.get_shader_parameter("effect_texture")
texture = material.get_shader_parameter(&"effect_texture")
func _exit_tree() -> void:
@@ -173,10 +173,10 @@ func _initialize_compute_code(init_with_texture_size: Vector2i) -> void:
tf.array_layers = 1
tf.mipmaps = 1
tf.usage_bits = (
RenderingDevice.TEXTURE_USAGE_SAMPLING_BIT |
RenderingDevice.TEXTURE_USAGE_STORAGE_BIT |
RenderingDevice.TEXTURE_USAGE_CAN_COPY_TO_BIT
)
RenderingDevice.TEXTURE_USAGE_SAMPLING_BIT |
RenderingDevice.TEXTURE_USAGE_STORAGE_BIT |
RenderingDevice.TEXTURE_USAGE_CAN_COPY_TO_BIT
)
for i in 3:
# Create our texture.