File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
src/renderers/webgpu/utils Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -161,29 +161,14 @@ class WebGPUUtils {
161
161
/**
162
162
* Returns a modified sample count from the given sample count value.
163
163
*
164
- * That is required since WebGPU does not support arbitrary sample counts .
164
+ * That is required since WebGPU only supports either 1 or 4 .
165
165
*
166
166
* @param {number } sampleCount - The input sample count.
167
167
* @return {number } The (potentially updated) output sample count.
168
168
*/
169
169
getSampleCount ( sampleCount ) {
170
170
171
- let count = 1 ;
172
-
173
- if ( sampleCount > 1 ) {
174
-
175
- // WebGPU only supports power-of-two sample counts and 2 is not a valid value
176
- count = Math . pow ( 2 , Math . floor ( Math . log2 ( sampleCount ) ) ) ;
177
-
178
- if ( count === 2 ) {
179
-
180
- count = 4 ;
181
-
182
- }
183
-
184
- }
185
-
186
- return count ;
171
+ return sampleCount >= 4 ? 4 : 1 ;
187
172
188
173
}
189
174
You can’t perform that action at this time.
0 commit comments