feat(texturefilter): Extend texture filtering to support; none, point, bilinear, trilinear and anisitropic filtering#2423
Open
Mauller wants to merge 7 commits intoTheSuperHackers:mainfrom
Conversation
|
67a9d46 to
57753f7
Compare
57753f7 to
2df4a8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR cleans up the texture filtering class and extends its functionality.
This can be squash merged, i seperated it into commits to make it easier to follow the changes when reviewing.
By default the game was stuck with Bilinear filtering, as they never added options to allow texture filtering to be altered within the game. This PR cleans up the original code and extends the support for more filtering modes.
At the moment this does nothing new. we still need to add the external code to set a different filtering mode, so the game still defaults to bilinear mode.
But now we have the following modes:
No filtering - Point filtering when minifying or maximising textures, mipmaps have no filtering
Point Filtering - The same as no filtering but mip maps now have point filtering
Bilinear - Default, Minifying and maximising now has linear filtering, mipmaps retain point filtering
Trilinear - The same as Bilinear but mipmaps now gain linear filtering
Anisotropic - Minifying and maximising now has anisotropic filtering and mip maps retain linear filtering.
Anisotropic filtering is defaulted to 2x which is the minimum and has a new static function to change the filtering mode.
If you want to test the changes, alter the
int WW3D::TextureFiltervariable in ww3d.cpp