mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #563 from signmotion/smallestVisiblePixelSize-work
Fixed issue #256: "$pref::TS::smallestVisiblePixelSize doesn't work".
This commit is contained in:
commit
9921786b9c
1 changed files with 5 additions and 0 deletions
|
|
@ -616,6 +616,11 @@ S32 TSShapeInstance::setDetailFromDistance( const SceneRenderState *state, F32 s
|
||||||
F32 pixelRadius = ( mShape->radius / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale;
|
F32 pixelRadius = ( mShape->radius / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale;
|
||||||
F32 pixelSize = pixelRadius * smDetailAdjust;
|
F32 pixelSize = pixelRadius * smDetailAdjust;
|
||||||
|
|
||||||
|
if ( pixelSize < smSmallestVisiblePixelSize ) {
|
||||||
|
mCurrentDetailLevel = -1;
|
||||||
|
return mCurrentDetailLevel;
|
||||||
|
}
|
||||||
|
|
||||||
if ( pixelSize > smSmallestVisiblePixelSize &&
|
if ( pixelSize > smSmallestVisiblePixelSize &&
|
||||||
pixelSize <= mShape->mSmallestVisibleSize )
|
pixelSize <= mShape->mSmallestVisibleSize )
|
||||||
pixelSize = mShape->mSmallestVisibleSize + 0.01f;
|
pixelSize = mShape->mSmallestVisibleSize + 0.01f;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue