@@ -39,7 +39,7 @@ void setup_snow_simulation_node(BaseNode &node)
3939 node.add_attr <FloatAttribute>(" talus_global" , " Base Repose Slope" , 1 .5f , 0 .f , FLT_MAX);
4040
4141 node.add_attr <FloatAttribute>(" duration" , " Simulation Duration" , 1 .f , 0 .f , 2 .f );
42- node.add_attr <IntAttribute>(" solver_stride" , " Solver Stride" , 2 , 1 , 32 );
42+ node.add_attr <IntAttribute>(" solver_stride" , " Solver Stride" , 4 , 1 , 32 );
4343
4444 node.add_attr <BoolAttribute>(" post_filter" , " Enable Thermal Relaxation" , true );
4545 node.add_attr <FloatAttribute>(" thermal_talus_ratio" ,
@@ -127,13 +127,13 @@ void compute_snow_simulation_node(BaseNode &node)
127127 float talus;
128128 };
129129
130- const int nx_strided = int ( float (p_z-> shape . x ) /
131- node. get_attr <IntAttribute>( " solver_stride " ) );
130+ const int stride = node. get_attr <IntAttribute>( " solver_stride " );
131+ const int nx_strided = int ( float (p_z-> shape . x ) / stride );
132132 const int iterations = int (node.get_attr <FloatAttribute>(" duration" ) * nx_strided);
133133 const float talus = node.get_attr <FloatAttribute>(" talus_global" ) / nx_strided;
134134
135135 return P{
136- .solver_stride = node. get_attr <IntAttribute>( " solver_stride " ) ,
136+ .solver_stride = stride ,
137137 .talus_global = node.get_attr <FloatAttribute>(" talus_global" ),
138138 .snow_depth = node.get_attr <FloatAttribute>(" snow_depth" ),
139139 .duration = node.get_attr <FloatAttribute>(" duration" ),
0 commit comments