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 {
161161 /**
162162 * Returns a modified sample count from the given sample count value.
163163 *
164- * That is required since WebGPU does not support arbitrary sample counts .
164+ * That is required since WebGPU only supports either 1 or 4 .
165165 *
166166 * @param {number } sampleCount - The input sample count.
167167 * @return {number } The (potentially updated) output sample count.
168168 */
169169 getSampleCount ( sampleCount ) {
170170
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 ;
187172
188173 }
189174
You can’t perform that action at this time.
0 commit comments