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

Ouzel reset shader uniform buffer offset at wrong place. #43

Closed
woc2006 opened this issue Sep 29, 2018 · 1 comment
Closed

Ouzel reset shader uniform buffer offset at wrong place. #43

woc2006 opened this issue Sep 29, 2018 · 1 comment

Comments

@woc2006
Copy link

woc2006 commented Sep 29, 2018

Code: master latest, sample project
Renderer: Metal

At RenderDeviceMetal.mm line 797, ouzel reset shaderConstantBuffer.offset = 0 if offset larger than it's size. But what if the shader buffer contains data which is committed yet.
I wrote a demo to draw 10k sprites with different uniforms, and only half of them are drawn correctly.

As shader buffer size is 1024 * 1024, and buffer alignment is 256, 1024 * 1024 = 256* (4*1024), it holds 4k uniforms at most.

@elnormous
Copy link
Owner

This is fixed in d053005

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

2 participants