Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melee Primitive Culling Currently Hardcoded #350

Open
PsiLupan opened this issue Apr 12, 2019 · 0 comments
Open

Melee Primitive Culling Currently Hardcoded #350

PsiLupan opened this issue Apr 12, 2019 · 0 comments
Labels

Comments

@PsiLupan
Copy link

The face culling settings have a hard-coded front culling. It's actually based on a bit flag in the Primitive object.

renderSettings.faceCullingSettings = new FaceCullingSettings(false, CullFaceMode.Front);

0xC of the primitive struct has an unsigned short containing the flags.
References: https://github.com/PsiLupan/FRAY/blob/master/src/hsd/hsd_pobj.c#L820
https://github.com/PsiLupan/FRAY/blob/master/src/hsd/hsd_pobj.h#L52

CULLFRONT is 0x4000
CULLBACK is 0x8000

If the flags & (POBJ_CULLFRONT|POBJ_CULLBACK) = 0, then there's no culling performed. If it's 0xC000, then the primitive isn't rendered at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants