mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-19 08:41:49 -05:00
mv TextureImportParamSet TextureDescriptorSet
This commit is contained in:
parent
adbe16e154
commit
f2495f61b5
|
|
@ -28,24 +28,24 @@ namespace UniGLTF
|
|||
public sealed class GltfTextureDescriptorGenerator : ITextureDescriptorGenerator
|
||||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
private TextureDescriptorSet _textureDescriptorSet;
|
||||
|
||||
public GltfTextureDescriptorGenerator(GltfParser parser)
|
||||
{
|
||||
m_parser = parser;
|
||||
}
|
||||
|
||||
public TextureImportParamSet Get()
|
||||
public TextureDescriptorSet Get()
|
||||
{
|
||||
if (_textureImportParamSet == null)
|
||||
if (_textureDescriptorSet == null)
|
||||
{
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
_textureDescriptorSet = new TextureDescriptorSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser))
|
||||
{
|
||||
_textureImportParamSet.Add(param);
|
||||
_textureDescriptorSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureImportParamSet;
|
||||
return _textureDescriptorSet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ namespace UniGLTF
|
|||
/// </summary>
|
||||
public interface ITextureDescriptorGenerator
|
||||
{
|
||||
TextureImportParamSet Get();
|
||||
TextureDescriptorSet Get();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace VRM
|
|||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private readonly glTF_VRM_extensions m_vrm;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
private TextureDescriptorSet _textureDescriptorSet;
|
||||
|
||||
public VrmTextureDescriptorGenerator(GltfParser parser, glTF_VRM_extensions vrm)
|
||||
{
|
||||
|
|
@ -18,17 +18,17 @@ namespace VRM
|
|||
m_vrm = vrm;
|
||||
}
|
||||
|
||||
public TextureImportParamSet Get()
|
||||
public TextureDescriptorSet Get()
|
||||
{
|
||||
if (_textureImportParamSet == null)
|
||||
if (_textureDescriptorSet == null)
|
||||
{
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
_textureDescriptorSet = new TextureDescriptorSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser, m_vrm))
|
||||
{
|
||||
_textureImportParamSet.Add(param);
|
||||
_textureDescriptorSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureImportParamSet;
|
||||
return _textureDescriptorSet;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,24 +10,24 @@ namespace UniVRM10
|
|||
public sealed class Vrm10TextureDescriptorGenerator : ITextureDescriptorGenerator
|
||||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
private TextureDescriptorSet _textureDescriptorSet;
|
||||
|
||||
public Vrm10TextureDescriptorGenerator(GltfParser parser)
|
||||
{
|
||||
m_parser = parser;
|
||||
}
|
||||
|
||||
public TextureImportParamSet Get()
|
||||
public TextureDescriptorSet Get()
|
||||
{
|
||||
if (_textureImportParamSet == null)
|
||||
if (_textureDescriptorSet == null)
|
||||
{
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
_textureDescriptorSet = new TextureDescriptorSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser))
|
||||
{
|
||||
_textureImportParamSet.Add(param);
|
||||
_textureDescriptorSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureImportParamSet;
|
||||
return _textureDescriptorSet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace VRMShaders
|
|||
/// <summary>
|
||||
/// TextureImportParam の集合を Unique な集合にする。
|
||||
/// </summary>
|
||||
public sealed class TextureImportParamSet
|
||||
public sealed class TextureDescriptorSet
|
||||
{
|
||||
private readonly Dictionary<SubAssetKey, TextureImportParam> _params = new Dictionary<SubAssetKey, TextureImportParam>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user