-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add support for linear filtering of floating point textures. #6943
Conversation
Thanks for the pull request @bagnell!
Reviewers, don't forget to make sure that:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
Bump. |
Who is best to review this? @ggetz @likangning93 @lilleyse |
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.
Looks good, just a couple small comments about the tests.
Specs/Renderer/CubeMapSpec.js
Outdated
} | ||
}); | ||
|
||
it('creates a cube map with half floating-point textures and linear filtering', function() { |
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.
It looks like creates a cube map with half floating-point textures
and creates a cube map with half floating-point textures and linear filtering
are actually testing the opposite thing, should the titles be swapped?
} | ||
}; | ||
|
||
if (!context.textureFloatLinear) { |
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.
Should this be textureHalfFloatLinear
?
this._textureFloat = !!getExtension(gl, ['OES_texture_float']); | ||
this._textureHalfFloat = !!getExtension(gl, ['OES_texture_half_float']); | ||
|
||
this._textureFloatLinear = !!getExtension(gl, ['OES_texture_float_linear']); |
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.
Does anything need to be taken into account for WebGL 1 vs. 2?
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.
I'm assuming that the extension is still required for WebGL 2. I couldn't find anything in the spec that says it isn't allowed in WebGL 2; however, I do see the extension for OES_texture_float_linear
under the WebGL 2 tab at webglreport.com. Also, I don't see the extension for OES_texture_half_float_linear
in the WebGL 2 tab, but I do see it under the WebGL 1 tab.
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.
According to MDN it is both a WebGL 1 and 2 extension.
https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_float_linear
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.
And OES_texture_half_float_linear
is gone under WebGL 2 and it's included with OES_texture_float_linear
. (Similar to what they did for floating-point color buffer attachments)
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.
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.
I guess so. The WebGL 2 conformance tests have a check to make sure that extension isn't available in WebGL 2:
https://github.com/KhronosGroup/WebGL/blob/master/conformance-suites/2.0.0/conformance2/extensions/promoted-extensions.html#L59
Looks good at quick glance. |
…re_half_float_linear extension in WebGL1 but by the OES_texture_float_linear extension in WebGL 2.
Looks good, thanks @bagnell. |
Textures can now have any of the linear options for the minification and magnification filter when the extensions are available. Otherwise, the filtering defaults to nearest.
This was pulled from the hdr branch.
CHANGES.md was not updated. All of the modifications are at the Renderer level.