metal-by-example / sample-code Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The format of the PVR file should be big-endian.
However, I found that the binary of PVRv3 file is treated as little-endian by default in the section of compressed texture.
And an incorrect PixelFormat will be obtained.
-[MTLTextureDescriptorInternal validateWithDevice:]:1414: failed assertion `MTLTextureDescriptor: Depth, Stencil, DepthStencil, and Multisample textures must be allocated with the MTLStorageModePrivate or MTLStorageModeMemoryless storage mode.'
assert failed at [self makeDepthTexture];
direct download of master branch in Xcode on macOS
don't know how to fix or I wouldn't be reading your wonderful book-
metal is a mystery to me!!
Hi! warrenm,I think you are skilled and want to read your book, metal by example, but how should I buy it?
Running the Drawing in 3D sample project on 10.15.5 in the iPhone 8 simulator results in the assert below:
validateFunctionArguments:3481: failed assertion `Vertex Function(vertex_project): the offset into the buffer uniforms that is bound at buffer index 1 must be a multiple of 256 but was set to 64.'
The assert can be fixed by padding the MBEUniforms
struct so it occupies 256 bytes, after which the project runs correctly. I don't know enough about the internals to know what the right way of fixing this is, however (would love to hear any insights since it would help further educate me).
Just to doubly-clarify: the project runs great on device, this only appears to occur in the simulator. Thanks for creating such a fantastic resource for Metal, Warren!
There's a very strange code appeared in line 788 of MBETextureDataSource.m
It force mipSize to 32 and caused the last mipmap data maybe overflowed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.