-
Notifications
You must be signed in to change notification settings - Fork 430
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
Feature/sampler filter wrap mipmap #969
Feature/sampler filter wrap mipmap #969
Conversation
Assets/UniGLTF/Runtime/UniGLTF/IO/TextureIO/TextureSamplerUtil.cs
Outdated
Show resolved
Hide resolved
return glFilter.LINEAR; | ||
case FilterMode.Bilinear: | ||
case FilterMode.Trilinear: | ||
return glFilter.LINEAR_MIPMAP_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.
よさそう!
case glFilter.NEAREST_MIPMAP_NEAREST: | ||
return (FilterMode.Point, false); | ||
|
||
case glFilter.NEAREST_MIPMAP_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.
NEAREST_MIPMAP_LINEAR
は、ミップマップ間はリニアで補間、そして 2D テクスチャ内では NN で補間、を指す。
あと Unity の |
GL の定義はこうかな?
そして Unity の定義はこうなのか?
参考: |
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.
よさそう
/// </summary> | ||
/// <param name="texture"></param> | ||
/// <returns></returns> | ||
public static glFilter ExportMinFilter(Texture2D texture) |
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.
Export の対応あってそう!
/// <param name="FilterMode"></param> | ||
/// <param name="filterMode"></param> | ||
/// <returns></returns> | ||
public static (FilterMode FilterMode, bool EnableMipMap) ImportFilterMode(glFilter filterMode) |
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.
Import の対応もあってそう!
#947