mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-07 02:12:07 +03:00
Update compute_shaders.rst (#6762)
* Update compute_shaders.rst 32 bit = to 4 bytes not 8 bytes. --------- Co-authored-by: Clay John <claynjohn@gmail.com>
This commit is contained in:
@@ -206,7 +206,7 @@ So let's initialize an array of floats and create a storage buffer:
|
||||
var input_bytes := input.to_byte_array()
|
||||
|
||||
# Create a storage buffer that can hold our float values.
|
||||
# Each float has 8 byte (32 bit) so 10 x 8 = 80 bytes
|
||||
# Each float has 4 bytes (32 bit) so 10 x 4 = 40 bytes
|
||||
var buffer := rd.storage_buffer_create(input_bytes.size(), input_bytes)
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -217,7 +217,7 @@ So let's initialize an array of floats and create a storage buffer:
|
||||
Buffer.BlockCopy(input, 0, inputBytes, 0, inputBytes.Length);
|
||||
|
||||
// Create a storage buffer that can hold our float values.
|
||||
// Each float has 8 byte (32 bit) so 10 x 8 = 80 bytes
|
||||
// Each float has 4 bytes (32 bit) so 10 x 4 = 40 bytes
|
||||
var buffer = rd.StorageBufferCreate((uint)inputBytes.Length, inputBytes);
|
||||
|
||||
With the buffer in place we need to tell the rendering device to use this
|
||||
|
||||
Reference in New Issue
Block a user