diff options
| author | Matthew Moulton <30711895+mmoult@users.noreply.github.com> | 2024-06-07 10:47:17 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 08:47:17 -0700 |
| commit | 78d34f3b3cec6222f87fc69eddfe66f3fc91b1cf (patch) | |
| tree | 3e3b2596e401c722de7c84b1e35a923d2051d0a7 /examples/autodiff-texture | |
| parent | 7c6faf62158eed309f01bbef8a7b88e0c36459c7 (diff) | |
Improve documentation and example formatting consistency (#4299)
* Improve doc and example consistency
Improve consistency of formatting in example shaders and remove
trailing spaces in documentation files. Fix minor typos.
Diffstat (limited to 'examples/autodiff-texture')
| -rw-r--r-- | examples/autodiff-texture/draw-quad.slang | 2 | ||||
| -rw-r--r-- | examples/autodiff-texture/reconstruct.slang | 4 | ||||
| -rw-r--r-- | examples/autodiff-texture/train.slang | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/autodiff-texture/draw-quad.slang b/examples/autodiff-texture/draw-quad.slang index 55a33b46b..6742e12fa 100644 --- a/examples/autodiff-texture/draw-quad.slang +++ b/examples/autodiff-texture/draw-quad.slang @@ -25,7 +25,7 @@ struct Fragment struct VertexStageOutput { float2 uv : UV; - float4 sv_position : SV_Position; + float4 sv_position : SV_Position; }; [shader("vertex")] diff --git a/examples/autodiff-texture/reconstruct.slang b/examples/autodiff-texture/reconstruct.slang index c123010e5..8ea033160 100644 --- a/examples/autodiff-texture/reconstruct.slang +++ b/examples/autodiff-texture/reconstruct.slang @@ -28,8 +28,8 @@ void computeMain(uint3 threadIdx : SV_DispatchThreadID) newDstValToAdd = (float3)dstVal.xyz * float3(1.0 / (dstVal.w * 65536.0)); float4 existingVal = 0.0; - - if (dstLayer < layerCount - 1 ) + + if (dstLayer < layerCount - 1) { uint parentOffset = mipOffset[(dstLayer + 1) / 4][(dstLayer + 1) % 4]; uint parentW = dstW / 2; diff --git a/examples/autodiff-texture/train.slang b/examples/autodiff-texture/train.slang index e171d3d71..c6a819d2f 100644 --- a/examples/autodiff-texture/train.slang +++ b/examples/autodiff-texture/train.slang @@ -2,12 +2,12 @@ // This class encapsulates a differentiable texture object that uses // hardware sampling for the primal version, but substitutes a reference -// interpolation implementation to generate backward pass. -// +// interpolation implementation to generate backward pass. +// // This specific implementation also makes the choice to use fast fixed point // atomics to accumulate the derivative (suitable for this example, but maybe // not in general) -// +// struct DifferentiableTexture { RWStructuredBuffer<int> accumulateBuffer; // Per-mip-level accumulate buffer |
