Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit c662c17e authored by Jakob Weiss's avatar Jakob Weiss

Fixed bug preventing saving MHD files from the inspector

parent e7e55015
......@@ -438,10 +438,12 @@ namespace campvis {
QString filename = QFileDialog::getSaveFileName(this, dialogCaption, directory, fileFilter);
MhdImageWriter writer;
writer.init();
writer.p_fileName.setValue(filename.toStdString());
writer.p_inputImage.setValue(name.toStdString());
writer.invalidate(AbstractProcessor::INVALID_RESULT);
writer.invalidate(AbstractProcessor::INVALID_RESULT | AbstractProcessor::FIRST_FREE_TO_USE_INVALIDATION_LEVEL); // needed for the save action to actually execute
writer.process(*_dataContainer);
writer.deinit();
}
else if (handle.getData<ImageData>() || handle.getData<RenderData>()) {
QString dialogCaption = "Export " + name + " as Image";
......@@ -546,4 +548,4 @@ namespace campvis {
_colorValWidget->setPalette(_colorValWidgetPalette);
}
}
\ No newline at end of file
}
......@@ -177,3 +177,15 @@ vec3 calculateContourShading(in vec3 position, in vec3 camera, in vec3 normal, i
float outlineStrength = 1. - pow(clamp(-dot(normalize(normal), normalize(position - camera)), 0, 1), contourExponent);
return mix(materialColor, outlineColor, outlineStrength);
}
vec4 calculateContourShading2(in vec3 position, in vec3 camera, in vec3 normal, in vec4 materialColor, in vec4 outlineColor, in float contourExponent) {
float outlineStrength = 1. - pow(clamp(dot(normal, normalize(camera - position)), 0, 1), contourExponent);
return outlineStrength * outlineColor;
}
void blendUnder(inout vec4 colorAbove, in vec4 colorBelow)
{
colorAbove.rgb = colorAbove.rgb + colorBelow.rgb * colorBelow.a * (1.0 - colorAbove.a);
colorAbove.a = colorAbove.a + (1.0 -colorAbove.a) * colorBelow.a;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment