ui allows to enable/disable the deformer componenets

This commit is contained in:
sam gateau 2018-09-21 16:45:21 -07:00
parent aa02dcb087
commit d8984dafa0
3 changed files with 10 additions and 31 deletions

View file

@ -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 };

View file

@ -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@>

View file

@ -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 {