Commit 85ac7336 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'clippingnode-worldspace' into 'master'

ClippingNode: Operate in world coordinates

See merge request !148
parents 05dd27d2 cf015c66
......@@ -205,10 +205,10 @@ void ClippingNode::ClippingShaderModifier::modifyVertexIO(ShaderGenerator* _shad
}
void ClippingNode::ClippingShaderModifier::modifyVertexBeginCode(QStringList* _code)
void ClippingNode::ClippingShaderModifier::modifyVertexEndCode(QStringList* _code)
{
for (int i = 0; i < numClipPlanes_; ++i)
_code->push_back(QString("gl_ClipDistance[%1] = dot(SG_INPUT_POSOS, g_SlicePlane%1);").arg(i));
_code->push_back(QString("gl_ClipDistance[%1] = dot(inverse(g_mWV) * sg_vPosVS, g_SlicePlane%1);").arg(i));
}
//=============================================================================
......
......@@ -174,7 +174,7 @@ private:
void modifyVertexIO(ShaderGenerator* _shader);
void modifyVertexBeginCode(QStringList* _code);
void modifyVertexEndCode(QStringList* _code);
private:
......
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