Procedural vertex shaders
Showing the changes to interface/src/Application.cpp (1 of 14 files). Show all
Unified · Split
| @@ -2109,6 +2109,23 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2108 unmodified lines | |||
| 2109 | } | 2109 | } |
| 2110 | return false; | 2110 | return false; |
| 2111 | }); | 2111 | }); |
| 2112 | EntityTree::setGetUnscaledDimensionsForIDOperator([this](const QUuid& id) { | ||
| 2113 | if (_aboutToQuit) { | ||
| 2114 | return glm::vec3(1.0f); | ||
| 2115 | } | ||
| 2116 | |||
| 2117 | auto entity = getEntities()->getEntity(id); | ||
| 2118 | if (entity) { | ||
| 2119 | return entity->getUnscaledDimensions(); | ||
| 2120 | } | ||
| 2121 | |||
| 2122 | auto avatarManager = DependencyManager::get<AvatarManager>(); | ||
| 2123 | auto avatar = static_pointer_cast<Avatar>(avatarManager->getAvatarBySessionID(id)); | ||
| 2124 | if (avatar) { | ||
| 2125 | return avatar->getSNScale(); | ||
| 2126 | } | ||
| 2127 | return glm::vec3(1.0f); | ||
| 2128 | }); | ||
| 2112 | Procedural::opaqueStencil = [](gpu::StatePointer state) { PrepareStencil::testMaskDrawShape(*state); }; | 2129 | Procedural::opaqueStencil = [](gpu::StatePointer state) { PrepareStencil::testMaskDrawShape(*state); }; |
| 2113 | Procedural::transparentStencil = [](gpu::StatePointer state) { PrepareStencil::testMask(*state); }; | 2130 | Procedural::transparentStencil = [](gpu::StatePointer state) { PrepareStencil::testMask(*state); }; |
| 2114 | 2131 | ||