mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-30 20:54:16 +02:00
use viewFrustum position for laser pointer render filtering
This commit is contained in:
parent
71c5644c23
commit
014d7b8d8d
1 changed files with 4 additions and 2 deletions
|
@ -568,10 +568,12 @@ void Avatar::postUpdate(float deltaTime) {
|
|||
}
|
||||
|
||||
void Avatar::render(RenderArgs* renderArgs) {
|
||||
auto& batch = *renderArgs->_batch;
|
||||
auto& batch = *(renderArgs->_batch);
|
||||
PROFILE_RANGE_BATCH(batch, __FUNCTION__);
|
||||
|
||||
if (glm::distance(DependencyManager::get<AvatarManager>()->getMyAvatarPosition(), getPosition()) < 10.0f) {
|
||||
glm::vec3 viewPos = renderArgs->getViewFrustum().getPosition();
|
||||
const float MAX_DISTANCE_SQUARED_FOR_SHOWING_POINTING_LASERS = 100.0f; // 10^2
|
||||
if (glm::distance2(viewPos, getPosition()) < MAX_DISTANCE_SQUARED_FOR_SHOWING_POINTING_LASERS) {
|
||||
auto geometryCache = DependencyManager::get<GeometryCache>();
|
||||
|
||||
// render pointing lasers
|
||||
|
|
Loading…
Reference in a new issue