-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable linear with comparisons. #4026
Conversation
It's a little confusing but depth textures used for "sampling" are not filterable but used for "comparisons" they are. | | texture_?d<f32> with depth texture | texture_depth_?? | | ----------------------------- | ---------------------------------- | ---------------- | | sampler `'linear'` | bad | bad | | sampler_comparison `'linear'` | N/A | OK |
* * 'depth16unorm' -> false | ||
* * 'rgba32float' -> true (you need to enable feature 'float32-filterable') | ||
*/ | ||
export function isFilterableAsTextureF32(format: GPUTextureFormat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: are r16float, rg16float, rgba16float filterable as TextureF32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, all normal color formats are filterable as textureF32 (r8unorm, r8snorm, rgba8norm, compressed formats, etc....). Effectively this is can you use the texture with texture_2d<f32>
, texture_2d_array<f32>
, texture_cube<f32>
, etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh for r16float and etc, their info.color?.type
is float already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
texture_depth_xxx can only be used with non-filtering samplers or comparison samples, not with filtering samplers. see table in gpuweb#4026
texture_depth_xxx can only be used with non-filtering samplers or comparison samples, not with filtering samplers. see table in gpuweb#4026 Also enabled more depth tests
texture_depth_xxx can only be used with non-filtering samplers or comparison samples, not with filtering samplers. see table in gpuweb#4026 Also enabled more depth tests
texture_depth_xxx can only be used with non-filtering samplers or comparison samples, not with filtering samplers. see table in #4026 Also enabled more depth tests
It's a little confusing but depth textures used for "sampling" are not filterable but used for "comparisons" they are.
'linear'
'linear'