mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +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);
|
Q_ASSERT(args->_batch);
|
||||||
gpu::Batch& batch = *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
|
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);
|
DependencyManager::get<DeferredLightingEffect>()->renderSolidSphere(batch, 0.5f, SLICES, STACKS, sphereColor);
|
||||||
|
|
||||||
RenderableDebugableEntityItem::render(this, args);
|
RenderableDebugableEntityItem::render(this, args);
|
||||||
|
|
Loading…
Reference in a new issue