diff --git a/tutorials/shaders/compute_shaders.rst b/tutorials/shaders/compute_shaders.rst index 569a128fb..2a51883fe 100644 --- a/tutorials/shaders/compute_shaders.rst +++ b/tutorials/shaders/compute_shaders.rst @@ -185,8 +185,8 @@ and create a precompiled version of it using this: // Load GLSL shader var shaderFile = GD.Load("res://compute_example.glsl"); - var shaderBytecode = shaderFile.GetSpirv(); - var shader = rd.ShaderCreateFromSpirv(shaderBytecode); + var shaderBytecode = shaderFile.GetSpirV(); + var shader = rd.ShaderCreateFromSpirV(shaderBytecode); Provide input data @@ -356,11 +356,11 @@ the data and print the results to our console. .. code-tab:: csharp // Read back the data from the buffers - var outputBytes = rd.BufferGetData(outputBuffer); + var outputBytes = rd.BufferGetData(buffer); var output = new float[input.Length]; Buffer.BlockCopy(outputBytes, 0, output, 0, outputBytes.Length); - GD.Print("Input: ", input) - GD.Print("Output: ", output) + GD.Print("Input: ", string.Join(", ", input)); + GD.Print("Output: ", string.Join(", ", output)); With that, you have everything you need to get started working with compute shaders.