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

Implement runtime M2 shader_id calculation logic matching Wrath of the Lich King #132

Open
fallenoak opened this issue May 28, 2016 · 1 comment

Comments

@fallenoak
Copy link
Member

fallenoak commented May 28, 2016

The Wrath of the Lich King (and potentially earlier game versions) game client does not simply select shaders for M2s based on the shader_id value present in the on-disk .skin files. Rather, it's determined at runtime based on a combination of blending mode, render flags, texture mapping, transparency animations, and etc.

The resulting value for shader_id, a masked integer, is then checked to select the appropriate string for vertex and pixel shaders.

To get M2s to render properly, we should implement the same shader_id calculation and shader selection logic as the official game client.

@fallenoak fallenoak changed the title Implement runtime M2 shader_id logic matching Wrath of the Lich King Implement runtime M2 shader_id calculation logic matching Wrath of the Lich King May 31, 2016
@fallenoak
Copy link
Member Author

fallenoak commented Jun 3, 2016

The shader_id calculation logic can live in the new BatchManager class.

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

No branches or pull requests

1 participant