workaround for bad sphere radius

This commit is contained in:
Andrew Meadows 2015-07-17 12:14:53 -07:00
parent f09b3eb736
commit 1c7afbda04

View file

@ -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);