mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
workaround for bad sphere radius
This commit is contained in:
parent
f09b3eb736
commit
1c7afbda04
1 changed files with 8 additions and 0 deletions
|
@ -39,7 +39,15 @@ void RenderableSphereEntityItem::render(RenderArgs* args) {
|
|||
|
||||
Q_ASSERT(args->_batch);
|
||||
gpu::Batch& batch = *args->_batch;
|
||||
#define USE_MAGIC_WORKAROUND
|
||||
#ifdef USE_MAGIC_WORKAROUND
|
||||
// It's a mystery how this actually works!
|
||||
Transform transform = getTransformToCenter();
|
||||
transform.setScale(transform.getScale());
|
||||
batch.setModelTransform(transform); // use a transform with scale, rotation, registration point and translation
|
||||
#else // USE_MAGIC_WORKAROUND
|
||||
batch.setModelTransform(getTransformToCenter()); // use a transform with scale, rotation, registration point and translation
|
||||
#endif // USE_MAGIC_WORKAROUND
|
||||
DependencyManager::get<DeferredLightingEffect>()->renderSolidSphere(batch, 0.5f, SLICES, STACKS, sphereColor);
|
||||
|
||||
RenderableDebugableEntityItem::render(this, args);
|
||||
|
|
Loading…
Reference in a new issue