mirror of
https://github.com/redstrate/Novus.git
synced 2025-06-06 13:17:46 +00:00
Update to latest libphysis, add known sampler keys
This commit is contained in:
parent
f6845f6a6f
commit
1faf6ed729
3 changed files with 73 additions and 64 deletions
2
extern/libphysis
vendored
2
extern/libphysis
vendored
|
@ -1 +1 @@
|
|||
Subproject commit a003502171ceed7a15d4dad705c68e4447a485e3
|
||||
Subproject commit ac3c28c18e1f2d39603a4cca3e44ec7a605ac3ac
|
|
@ -320,6 +320,7 @@ const QHash<uint, const char *> keys = {
|
|||
{0x198D11CD, "Color"},
|
||||
{0xA02F4828, "Multi"},
|
||||
|
||||
// Parameters
|
||||
{physis_shpk_crc("g_DiffuseColor"), "g_DiffuseColor"},
|
||||
{physis_shpk_crc("g_AlphaThreshold"), "g_AlphaThreshold"},
|
||||
{physis_shpk_crc("g_FresnelValue0"), "g_FresnelValue0"},
|
||||
|
@ -333,4 +334,70 @@ const QHash<uint, const char *> keys = {
|
|||
{physis_shpk_crc("g_TileIndex"), "g_TileIndex"},
|
||||
{physis_shpk_crc("g_AmbientOcclusionMask"), "g_AmbientOcclusionMask"},
|
||||
{physis_shpk_crc("g_ScatteringLevel"), "g_ScatteringLevel"},
|
||||
{physis_shpk_crc("g_NormalScale"), "g_NormalScale"}};
|
||||
{physis_shpk_crc("g_NormalScale"), "g_NormalScale"},
|
||||
|
||||
// Samplers
|
||||
{physis_shpk_crc("g_SamplerViewPosition"), "g_SamplerViewPosition"},
|
||||
{physis_shpk_crc("g_SamplerVPosition"), "g_SamplerVPosition"},
|
||||
{physis_shpk_crc("g_SamplerDither"), "g_SamplerDither"},
|
||||
{physis_shpk_crc("g_SamplerColorMap0"), "g_SamplerColorMap0"},
|
||||
{physis_shpk_crc("g_SamplerColorMap1"), "g_SamplerColorMap1"},
|
||||
{physis_shpk_crc("g_SamplerNormalMap0"), "g_SamplerNormalMap0"},
|
||||
{physis_shpk_crc("g_SamplerNormalMap1"), "g_SamplerNormalMap1"},
|
||||
{physis_shpk_crc("g_SamplerSpecularMap0"), "g_SamplerSpecularMap0"},
|
||||
{physis_shpk_crc("g_SamplerSpecularMap1"), "g_SamplerSpecularMap1"},
|
||||
{physis_shpk_crc("g_SamplerEnvMap"), "g_SamplerEnvMap"},
|
||||
{physis_shpk_crc("g_SamplerLightDiffuse"), "g_SamplerLightDiffuse"},
|
||||
{physis_shpk_crc("g_SamplerLightSpecular"), "g_SamplerLightSpecular"},
|
||||
{physis_shpk_crc("g_SamplerAttenuation"), "g_SamplerAttenuation"},
|
||||
{physis_shpk_crc("g_SamplerOmniShadowStatic"), "g_SamplerOmniShadowStatic"},
|
||||
{physis_shpk_crc("g_SamplerOmniShadowDynamic"), "g_SamplerOmniShadowDynamic"},
|
||||
{physis_shpk_crc("g_SamplerOmniShadowIndexTable"), "g_SamplerOmniShadowIndexTable"},
|
||||
{physis_shpk_crc("g_SamplerGBuffer"), "g_SamplerGBuffer"},
|
||||
{physis_shpk_crc("g_SamplerGBuffer1"), "g_SamplerGBuffer1"},
|
||||
{physis_shpk_crc("g_SamplerGBuffer2"), "g_SamplerGBuffer2"},
|
||||
{physis_shpk_crc("g_SamplerGBuffer3"), "g_SamplerGBuffer3"},
|
||||
{physis_shpk_crc("g_SamplerLight"), "g_SamplerLight"},
|
||||
{physis_shpk_crc("g_SamplerShadow"), "g_SamplerShadow"},
|
||||
{physis_shpk_crc("g_CloudShadowSampler"), "g_CloudShadowSampler"},
|
||||
{physis_shpk_crc("g_RoofSampler"), "g_RoofSampler"},
|
||||
{physis_shpk_crc("g_AnimSampler"), "g_AnimSampler"},
|
||||
{physis_shpk_crc("g_SamplerCaustics"), "g_SamplerCaustics"},
|
||||
{physis_shpk_crc("g_SamplerCaustics"), "g_SamplerCaustics"},
|
||||
{physis_shpk_crc("g_SamplerColor1"), "g_SamplerColor1"},
|
||||
{physis_shpk_crc("g_SamplerColor2"), "g_SamplerColor2"},
|
||||
{physis_shpk_crc("g_SamplerColor3"), "g_SamplerColor3"},
|
||||
{physis_shpk_crc("g_SamplerColor4"), "g_SamplerColor4"},
|
||||
{physis_shpk_crc("g_SamplerDistortion"), "g_SamplerDistortion"},
|
||||
{physis_shpk_crc("g_SamplerPalette"), "g_SamplerPalette"},
|
||||
{physis_shpk_crc("g_SamplerDiffuse"), "g_SamplerDiffuse"},
|
||||
{physis_shpk_crc("g_SamplerNormal"), "g_SamplerNormal"},
|
||||
{physis_shpk_crc("g_SamplerMask"), "g_SamplerMask"},
|
||||
{physis_shpk_crc("g_SamplerSpecular"), "g_SamplerSpecular"},
|
||||
{physis_shpk_crc("g_SamplerDecal"), "g_SamplerDecal"},
|
||||
{physis_shpk_crc("g_SamplerTable"), "g_SamplerTable"},
|
||||
{physis_shpk_crc("g_SamplerTileDiffuse"), "g_SamplerTileDiffuse"},
|
||||
{physis_shpk_crc("g_SamplerTileNormal"), "g_SamplerTileNormal"},
|
||||
{physis_shpk_crc("g_SamplerIndex"), "g_SamplerIndex"},
|
||||
{physis_shpk_crc("g_SamplerCatchlight"), "g_SamplerCatchlight"},
|
||||
{physis_shpk_crc("g_SamplerReflection"), "g_SamplerReflection"},
|
||||
{physis_shpk_crc("g_SamplerOcclusion"), "g_SamplerOcclusion"},
|
||||
{physis_shpk_crc("g_SamplerDepth"), "g_SamplerDepth"},
|
||||
{physis_shpk_crc("g_ToneMapSampler"), "g_ToneMapSampler"},
|
||||
{physis_shpk_crc("g_SkySampler"), "g_SkySampler"},
|
||||
{physis_shpk_crc("g_Sampler"), "g_Sampler"},
|
||||
{physis_shpk_crc("g_SamplerFresnel"), "g_SamplerFresnel"},
|
||||
{physis_shpk_crc("g_SamplerColorMap"), "g_SamplerColorMap"},
|
||||
{physis_shpk_crc("g_SamplerNormalMap"), "g_SamplerNormalMap"},
|
||||
{physis_shpk_crc("g_SamplerMaskMap"), "g_SamplerMaskMap"},
|
||||
{physis_shpk_crc("g_SamplerSpecularMap"), "g_SamplerSpecularMap"},
|
||||
{physis_shpk_crc("g_SamplerDistortionMap"), "g_SamplerDistortionMap"},
|
||||
{physis_shpk_crc("g_SamplerWaveMap"), "g_SamplerWaveMap"},
|
||||
{physis_shpk_crc("g_SamplerWhitecapMap"), "g_SamplerWhitecapMap"},
|
||||
{physis_shpk_crc("g_SamplerWaveletMap0"), "g_SamplerWaveletMap0"},
|
||||
{physis_shpk_crc("g_SamplerWaveletMap1"), "g_SamplerWaveletMap1"},
|
||||
{physis_shpk_crc("g_SamplerReflectionMap"), "g_SamplerReflectionMap"},
|
||||
{physis_shpk_crc("g_SamplerNoise"), "g_SamplerNoise"},
|
||||
{physis_shpk_crc("g_SamplerWaveletNoise"), "g_SamplerWaveletNoise"},
|
||||
{physis_shpk_crc("g_SamplerRefractionMap"), "g_SamplerRefractionMap"},
|
||||
};
|
||||
|
|
|
@ -127,67 +127,9 @@ void MtrlPart::rebuild()
|
|||
for (uint32_t i = 0; i < m_material.num_samplers; i++) {
|
||||
const auto sampler = m_material.samplers[i];
|
||||
|
||||
QString name;
|
||||
switch (sampler.texture_usage) {
|
||||
case TextureUsage::Sampler:
|
||||
case TextureUsage::Sampler0:
|
||||
case TextureUsage::Sampler1:
|
||||
name = i18n("Generic");
|
||||
break;
|
||||
case TextureUsage::SamplerCatchlight:
|
||||
name = i18n("Catchlight");
|
||||
break;
|
||||
case TextureUsage::SamplerColorMap0:
|
||||
name = i18n("Color Map 0");
|
||||
break;
|
||||
case TextureUsage::SamplerColorMap1:
|
||||
name = i18n("Color Map 1");
|
||||
break;
|
||||
case TextureUsage::SamplerDiffuse:
|
||||
name = i18n("Diffuse");
|
||||
break;
|
||||
case TextureUsage::SamplerEnvMap:
|
||||
name = i18n("Environment Map");
|
||||
break;
|
||||
case TextureUsage::SamplerMask:
|
||||
name = i18n("Mask");
|
||||
break;
|
||||
case TextureUsage::SamplerNormal:
|
||||
name = i18n("Normal");
|
||||
break;
|
||||
case TextureUsage::SamplerNormalMap0:
|
||||
name = i18n("Normal Map 0");
|
||||
break;
|
||||
case TextureUsage::SamplerNormalMap1:
|
||||
name = i18n("Normal Map 1");
|
||||
break;
|
||||
case TextureUsage::SamplerReflection:
|
||||
name = i18n("Reflection");
|
||||
break;
|
||||
case TextureUsage::SamplerSpecular:
|
||||
name = i18n("Specular");
|
||||
break;
|
||||
case TextureUsage::SamplerSpecularMap0:
|
||||
name = i18n("Specular Map 0");
|
||||
break;
|
||||
case TextureUsage::SamplerSpecularMap1:
|
||||
name = i18n("Specular Map 1");
|
||||
break;
|
||||
case TextureUsage::SamplerWaveMap:
|
||||
name = i18n("Wave Map");
|
||||
break;
|
||||
case TextureUsage::SamplerWaveletMap0:
|
||||
name = i18n("Wavelet Map 0");
|
||||
break;
|
||||
case TextureUsage::SamplerWaveletMap1:
|
||||
name = i18n("Wavelet Map 1");
|
||||
break;
|
||||
case TextureUsage::SamplerWhitecapMap:
|
||||
name = i18n("Whitecap Map");
|
||||
break;
|
||||
default:
|
||||
name = i18n("Unknown");
|
||||
break;
|
||||
QString name = i18n("Unknown");
|
||||
if (keys.contains(sampler.texture_usage)) {
|
||||
name = QString::fromLatin1(keys[sampler.texture_usage]);
|
||||
}
|
||||
|
||||
auto groupBox = new QGroupBox(name);
|
||||
|
@ -226,4 +168,4 @@ void MtrlPart::rebuild()
|
|||
}
|
||||
}
|
||||
|
||||
#include "moc_mtrlpart.cpp"
|
||||
#include "moc_mtrlpart.cpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue