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

CCSprite initWithTexture - A8ColorShader not assigned #1286

Open
heiko-henrich opened this issue Apr 2, 2015 · 1 comment
Open

CCSprite initWithTexture - A8ColorShader not assigned #1286

heiko-henrich opened this issue Apr 2, 2015 · 1 comment

Comments

@heiko-henrich
Copy link

In order to get the shader for 8Bit textures working,
it has to be assigned to self.shader in the initializer:

self.shader = texture.pixelFormat == CCTexturePixelFormat_A8 ? [CCShader positionTextureA8ColorShader] : [CCShader positionTextureColorShader];

I know the 8-Bit-Shader will get obsolete, but maybe it is nice to get it working for the final version of 3.4.

@heiko-henrich
Copy link
Author

When the bug is fixed, than the color property is used to paint the monochrome 8-bit texture. Otherwise 8-Bit textures are always black.

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

No branches or pull requests

1 participant