mirror of
https://github.com/lubosz/overte.git
synced 2025-04-05 16:46:28 +02:00
fix some warnings, disable outlines for now
This commit is contained in:
parent
c04c037588
commit
9cb29bb3a3
4 changed files with 50 additions and 49 deletions
|
@ -52,55 +52,55 @@ namespace scriptable {
|
|||
ScriptableMaterial(const ScriptableMaterial& material) { *this = material; }
|
||||
ScriptableMaterial& operator=(const ScriptableMaterial& material);
|
||||
|
||||
QString name;
|
||||
QString model;
|
||||
float opacity;
|
||||
float roughness;
|
||||
float metallic;
|
||||
float scattering;
|
||||
bool unlit;
|
||||
glm::vec3 emissive;
|
||||
glm::vec3 albedo;
|
||||
QString emissiveMap;
|
||||
QString albedoMap;
|
||||
QString opacityMap;
|
||||
QString opacityMapMode;
|
||||
float opacityCutoff;
|
||||
QString metallicMap;
|
||||
QString specularMap;
|
||||
QString roughnessMap;
|
||||
QString glossMap;
|
||||
QString normalMap;
|
||||
QString bumpMap;
|
||||
QString occlusionMap;
|
||||
QString lightMap;
|
||||
QString scatteringMap;
|
||||
QString name { "" };
|
||||
QString model { "" };
|
||||
float opacity { 0.0f };
|
||||
float roughness { 0.0f };
|
||||
float metallic { 0.0f };
|
||||
float scattering { 0.0f };
|
||||
bool unlit { false };
|
||||
glm::vec3 emissive { 0.0f };
|
||||
glm::vec3 albedo { 0.0f };
|
||||
QString emissiveMap { "" };
|
||||
QString albedoMap { "" };
|
||||
QString opacityMap { "" };
|
||||
QString opacityMapMode { "" };
|
||||
float opacityCutoff { 0.0f };
|
||||
QString metallicMap { "" };
|
||||
QString specularMap { "" };
|
||||
QString roughnessMap { "" };
|
||||
QString glossMap { "" };
|
||||
QString normalMap { "" };
|
||||
QString bumpMap { "" };
|
||||
QString occlusionMap { "" };
|
||||
QString lightMap { "" };
|
||||
QString scatteringMap { "" };
|
||||
std::array<glm::mat4, graphics::Material::NUM_TEXCOORD_TRANSFORMS> texCoordTransforms;
|
||||
QString cullFaceMode;
|
||||
bool defaultFallthrough;
|
||||
QString cullFaceMode { "" };
|
||||
bool defaultFallthrough { false };
|
||||
std::unordered_map<uint, bool> propertyFallthroughs; // not actually exposed to script
|
||||
|
||||
QString procedural;
|
||||
QString procedural { "" };
|
||||
|
||||
glm::vec3 shade;
|
||||
QString shadeMap;
|
||||
float shadingShift;
|
||||
QString shadingShiftMap;
|
||||
float shadingToony;
|
||||
glm::vec3 matcap;
|
||||
QString matcapMap;
|
||||
glm::vec3 parametricRim;
|
||||
float parametricRimFresnelPower;
|
||||
float parametricRimLift;
|
||||
QString rimMap;
|
||||
float rimLightingMix;
|
||||
QString outlineWidthMode;
|
||||
float outlineWidth;
|
||||
glm::vec3 outline;
|
||||
QString uvAnimationMaskMap;
|
||||
float uvAnimationScrollXSpeed;
|
||||
float uvAnimationScrollYSpeed;
|
||||
float uvAnimationRotationSpeed;
|
||||
glm::vec3 shade { 0.0f };
|
||||
QString shadeMap { "" };
|
||||
float shadingShift { 0.0f };
|
||||
QString shadingShiftMap { "" };
|
||||
float shadingToony { 0.0f };
|
||||
glm::vec3 matcap { 0.0f };
|
||||
QString matcapMap { "" };
|
||||
glm::vec3 parametricRim { 0.0f };
|
||||
float parametricRimFresnelPower { 0.0f };
|
||||
float parametricRimLift { 0.0f };
|
||||
QString rimMap { "" };
|
||||
float rimLightingMix { 0.0f };
|
||||
QString outlineWidthMode { "" };
|
||||
float outlineWidth { 0.0f };
|
||||
glm::vec3 outline { 0.0f };
|
||||
QString uvAnimationMaskMap { "" };
|
||||
float uvAnimationScrollXSpeed { 0.0f };
|
||||
float uvAnimationScrollYSpeed { 0.0f };
|
||||
float uvAnimationRotationSpeed { 0.0f };
|
||||
|
||||
graphics::MaterialKey key { 0 };
|
||||
};
|
||||
|
|
|
@ -72,8 +72,8 @@ Material::Material() {
|
|||
|
||||
Material::Material(const Material& material) :
|
||||
_name(material._name),
|
||||
_model(material._model),
|
||||
_key(material._key),
|
||||
_model(material._model),
|
||||
_emissive(material._emissive),
|
||||
_opacity(material._opacity),
|
||||
_albedo(material._albedo),
|
||||
|
|
|
@ -725,7 +725,8 @@ std::pair<std::string, std::shared_ptr<NetworkMaterial>> NetworkMaterialResource
|
|||
} else {
|
||||
NetworkMToonMaterial::OutlineWidthMode mode;
|
||||
if (NetworkMToonMaterial::getOutlineWidthModeFromName(valueString.toStdString(), mode)) {
|
||||
toonMaterial->setOutlineWidthMode(mode);
|
||||
// FIXME: Outlines are currently disabled because they're buggy
|
||||
//toonMaterial->setOutlineWidthMode(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,9 +69,9 @@ namespace render {
|
|||
glm::vec4 p2 = projection * (viewPos - glm::vec4(0.0f, 0.5f * outlineWidth, 0.0f, 0.0f));
|
||||
p2 /= p2.w;
|
||||
|
||||
style._outlineWidth = 0.5 * screenHeight * fabs(p1.y - p2.y);
|
||||
style._outlineWidth = floor(0.5f * (float)screenHeight * fabs(p1.y - p2.y));
|
||||
} else { // OUTLINE_SCREEN
|
||||
style._outlineWidth = outlineWidth * screenHeight;
|
||||
style._outlineWidth = floor(outlineWidth * (float)screenHeight);
|
||||
}
|
||||
|
||||
return style;
|
||||
|
|
Loading…
Reference in a new issue