Check if an Entity has been culled

Posted By: BoH_Havoc

Check if an Entity has been culled - 01/10/11 22:58

Hi,
I was wondering if there is a faster way than ent_pvs to determine if an entity has been culled or not.
I created a spotlight shader/script with dynamic shadows for shade-c which uses obb-obb and cone-sphere intersection tests to determine if the spotlight is inside the view frustum. It's all nice and shiny, but i'm still struggeling with the case of a spotlight beeing behind a wall and not visible to the camera.

I think using ent_pvs and going through a loop with all visible entities each frame just to get 1 out of X entities is a rather slow approach (?).
And if i remember correctly i already played around with entity visibility in the past and there was another way to do it, but i can't exactly remember. Maybe it was another engine or i dreamed it ... but i'm quite certain it was A7 laugh

Would be really nice if you could give me a hint here to speed up my spotlights even more laugh


Posted By: WretchedSid

Re: Check if an Entity has been culled - 01/10/11 23:05

ENTITY objects get the CLIPPED flag assigned when they get culled.
Posted By: BoH_Havoc

Re: Check if an Entity has been culled - 01/10/11 23:13

Now why the hell didn't i find this in the manual or somewhere else in the forum.

I'm really getting old....

Thanks JustSid! laugh
Posted By: Superku

Re: Check if an Entity has been culled - 01/11/11 00:05

Sorry for offtopic, but I cannot believe I've missed ent_pvs since v7.08. frown I've always looked for this feature.
© 2024 lite-C Forums