문제

I was just wondering if there is any way to alter the sprite-batch's shader and write a custom shader without having to use a new mesh?

도움이 되었습니까?

해결책

There's a SpriteBatch constructor that takes in a ShaderProgram. You can also set it using setShader().

Make sure you include the required vertex attributes and uniforms in your shader however (see the SpriteBatch code), as the SpriteBatch will want to set these.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top