Commit 5299ef91 authored by Christopher Tenter's avatar Christopher Tenter
Browse files

reset normal interpolator if interpolation should be smooth

parent 375887a2
......@@ -164,6 +164,8 @@ void RenderObject::setupShaderGenFromDrawmode( const SceneGraph::DrawModes::Draw
if (_props->normalSource() == SceneGraph::DrawModes::NORMAL_PER_FACE)
shaderDesc.vertexNormalInterpolator = "flat";
else
shaderDesc.vertexNormalInterpolator.clear();
if (_props->primitive() == SceneGraph::DrawModes::PRIMITIVE_WIREFRAME ||
_props->primitive() == SceneGraph::DrawModes::PRIMITIVE_HIDDENLINE ||
......
......@@ -775,6 +775,8 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
if (props->normalSource() == DrawModes::NORMAL_PER_FACE)
ro.shaderDesc.vertexNormalInterpolator = "flat";
else
ro.shaderDesc.vertexNormalInterpolator.clear();
// handle 'special' primitives (wireframe, hiddenline, primitives in sysmem buffers)..
......
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