mirror of
https://github.com/lubosz/overte.git
synced 2025-04-11 06:32:09 +02:00
ui allows to enable/disable the deformer componenets
This commit is contained in:
parent
aa02dcb087
commit
d8984dafa0
3 changed files with 10 additions and 31 deletions
|
@ -152,7 +152,6 @@ class MakeLightingModelConfig : public render::Job::Config {
|
|||
Q_PROPERTY(bool enableSkinning MEMBER enableSkinning NOTIFY dirty)
|
||||
Q_PROPERTY(bool enableBlendshape MEMBER enableBlendshape NOTIFY dirty)
|
||||
|
||||
|
||||
public:
|
||||
MakeLightingModelConfig() : render::Job::Config() {} // Make Lighting Model is always on
|
||||
|
||||
|
@ -178,7 +177,6 @@ public:
|
|||
|
||||
bool enableWireframe { false }; // false by default
|
||||
bool enableHaze{ true };
|
||||
|
||||
bool enableBloom{ true };
|
||||
bool enableSkinning{ true };
|
||||
bool enableBlendshape{ true };
|
||||
|
|
|
@ -49,37 +49,18 @@ void evalMeshDeformer(vec4 inPosition, out vec4 outPosition
|
|||
<@endif@>
|
||||
|
||||
<@if USE_BLENDSHAPE@>
|
||||
/*
|
||||
vec4 _deformedPosition = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
<@if USE_NORMAL@>
|
||||
vec3 _deformedNormal = vec3(0.0, 0.0, 0.0);
|
||||
<@endif@>
|
||||
<@if USE_TANGENT@>
|
||||
vec3 _deformedTangent = vec3(0.0, 0.0, 0.0);
|
||||
<@endif@>
|
||||
*/
|
||||
if (isBlendshapeEnabled()) {
|
||||
|
||||
<@if USE_TANGENT@>
|
||||
applyBlendshapeOffset(vertexIndex, inPosition, _deformedPosition, inNormal, _deformedNormal, inTangent, _deformedTangent);
|
||||
<@else@>
|
||||
<@if USE_NORMAL@>
|
||||
applyBlendshapeOffset(vertexIndex, inPosition, _deformedPosition, inNormal, _deformedNormal);
|
||||
<@else@>
|
||||
applyBlendshapeOffset(vertexIndex, inPosition, _deformedPosition);
|
||||
<@endif@>
|
||||
<@endif@>
|
||||
}/* else {
|
||||
vec4 _deformedPosition = inPosition;
|
||||
<@if USE_NORMAL@>
|
||||
vec3 _deformedNormal = inNormal;
|
||||
applyBlendshapeOffset(vertexIndex, inPosition, _deformedPosition, inNormal, _deformedNormal);
|
||||
<@else@>
|
||||
applyBlendshapeOffset(vertexIndex, inPosition, _deformedPosition);
|
||||
<@endif@>
|
||||
<@if USE_TANGENT@>
|
||||
vec3 _deformedTangent = inTangent;
|
||||
<@endif@>
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
<@endif@>
|
||||
|
||||
<@if USE_SKINNING@>
|
||||
|
@ -87,11 +68,11 @@ void evalMeshDeformer(vec4 inPosition, out vec4 outPosition
|
|||
<@if USE_TANGENT@>
|
||||
skinPositionNormalTangent(inSkinClusterIndex, inSkinClusterWeight, _deformedPosition, _deformedNormal, _deformedTangent, _deformedPosition, _deformedNormal, _deformedTangent);
|
||||
<@else@>
|
||||
<@if USE_NORMAL@>
|
||||
skinPositionNormal(inSkinClusterIndex, inSkinClusterWeight, _deformedPosition, _deformedNormal, _deformedPosition, _deformedNormal);
|
||||
<@else@>
|
||||
skinPosition(inSkinClusterIndex, inSkinClusterWeight, _deformedPosition, _deformedPosition);
|
||||
<@endif@>
|
||||
<@if USE_NORMAL@>
|
||||
skinPositionNormal(inSkinClusterIndex, inSkinClusterWeight, _deformedPosition, _deformedNormal, _deformedPosition, _deformedNormal);
|
||||
<@else@>
|
||||
skinPosition(inSkinClusterIndex, inSkinClusterWeight, _deformedPosition, _deformedPosition);
|
||||
<@endif@>
|
||||
<@endif@>
|
||||
}
|
||||
<@endif@>
|
||||
|
|
|
@ -71,7 +71,7 @@ Rectangle {
|
|||
"Specular:LightingModel:enableSpecular",
|
||||
"Albedo:LightingModel:enableAlbedo",
|
||||
"Wireframe:LightingModel:enableWireframe",
|
||||
"Skinning:LightingModel:enableSkinnning",
|
||||
"Skinning:LightingModel:enableSkinning",
|
||||
"Blendshape:LightingModel:enableBlendshape"
|
||||
]
|
||||
HifiControls.CheckBox {
|
||||
|
|
Loading…
Reference in a new issue