summaryrefslogtreecommitdiff
path: root/tests/autodiff/material2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/autodiff/material2')
-rw-r--r--tests/autodiff/material2/MxWeights.slang6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/autodiff/material2/MxWeights.slang b/tests/autodiff/material2/MxWeights.slang
index 1e9c7d36c..244d97c73 100644
--- a/tests/autodiff/material2/MxWeights.slang
+++ b/tests/autodiff/material2/MxWeights.slang
@@ -3,6 +3,12 @@
public struct MxWeights<let TBsdfCount : int>
{
public float3 weights[TBsdfCount];
+
+ public __init()
+ {
+ for (int i = 0; i < TBsdfCount; i++)
+ weights[i] = float3(0.0f);
+ }
}
public interface IMxLayeredMaterialData