Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [metal]

Metal is Apple's proprietary hardware-accelerated graphics API for macOS, iOS and tvOS.

Filter by
Sorted by
Tagged with
1 vote
2 answers
97 views

How do you handle shaders/graphics while remaining cross-platform?

I'm building a C++ based game engine, and I have my ECS complete as well as some basic components for stuff like graphics & audio. However, I'm currently using a custom interface on top of SFML ...
Spencer Rosas-Gunn's user avatar
0 votes
1 answer
101 views

How can I correctly pass 2 vertices instead of all 4 for a quad to a vertex shader?

If I am rendering quads, but all the quads will be axis-aligned (that is, their plane is always parallel to either the X Y or Z plane), I thought I could cut vertex video memory usage in half by ...
CPlus's user avatar
  • 143
0 votes
1 answer
272 views

Is instanced rendering any different from indexing seperate buffers using div and mod in the shader?

As far as I can tell instanced rendering is simply a way to separate a single vertex buffer into a buffer for vertex-specific data and instance-specific data. This could be useful for rendering ...
CPlus's user avatar
  • 143
1 vote
0 answers
33 views

How do I rotate OBJ submeshes relative to themselves (or arbitrary point, as opposed to relative to the whole model)?

I'm creating my own flight simulator game from scratch, using Swift and Metal, for learning purposes, and I'm wondering how I can move certain parts of my aircraft model. My model is a free OBJ file ...
Tino's user avatar
  • 11
0 votes
1 answer
100 views

How to compute visible area of a sphere

I have a number of spheres in my scene. I also have another object that I want to scale depending on the amount of a selected sphere that is visible (it can be occluded by multiple other spheres ...
BinaryGuy's user avatar
  • 141
0 votes
0 answers
47 views

INSANE Slowdown when implementing MSAA

I am trying to implement MSAA in my very simple raytracer. However, when I do, my program gets and insane slowdown. I am working in Metal, and on the Metal HUD, I can see that my frametimes drop from ...
oli2's user avatar
  • 3
0 votes
1 answer
123 views

Why might performance of a Rust-sdl2 project be better while profiling?

I'm making a simple SDL2-based Rust game, on an OSX laptop. Graphics mostly involves drawing lots of colored squares to the screen. Performance is really slow for what I'm doing, so I decided to ...
sclamons's user avatar
0 votes
0 answers
42 views

Do D3D11 / Metal / Vulcan programs commonly use upload/buffer threads?

I am porting an older OpenGL ES 2 program to more modern APIs (DX11/Metal/Vulkan, let's say.) The existing code uses a dedicated uploading/buffering thread (via a "share context") to upload ...
nmr's user avatar
  • 101
0 votes
0 answers
418 views

Very basic question: Passing data in fragment shader to next frame (Metal)

I am casually trying to learn a bit about writing simple fragment shaders, in particular using Metal API. I have been experimenting in KodeLife. As a simple example, I am trying to remake the Double ...
Heidar's user avatar
  • 101
0 votes
2 answers
325 views

Quaternions distorting object in Metal

I've been trying to get rotations with quaternions to work for a while now, and I feel I am very close to it actually working but I just can't get it to work. I do not have a view matrix yet and am ...
CaptainLupa's user avatar
1 vote
1 answer
717 views

Rendering voxel data efficiently

With Metal, I need to pass in an array of primitives to the GPU to be rendered. I'm making a terrain-based voxel game like Minecraft, but I have a problem. foring ...
user144953's user avatar
1 vote
0 answers
771 views

Unreal editor warns that Xcode is not installed on MacOS 10.14

I'm running MacOS 10.14.6. When I launch Unreal v4.25.0, I get the following warning: Xcode was not detected on this Mac. Metal shader compilation will fall back to runtime compiled text shaders, ...
tomh's user avatar
  • 111
0 votes
0 answers
230 views

Why is Metal is rendering textures SLIGHTLY darker than they should be?

I already checked this question. Using [MTKTextureLoader.Option.SRGB : false] in texture loader options doesn't work. All that happens is when I do ...
user avatar
0 votes
1 answer
59 views

One DeviceContext per Material?

In D3D11, we have a DeviceContext, which represents the Renderpipeline. In Metal, we have a RenderPipelineState. In Metal, I cache the RenderPipelineState, it is the abstraction of a "material". Is ...
Raildex's user avatar
  • 761
1 vote
1 answer
308 views

How to render two or more images on a video frame in the same draw call using Metal?

I'm a newbie to graphics programming and I have an existing code base which basically takes frame from video and passes it to a metal shader where effects (like colour changes) happen. What is ...
Shreyas Shetty's user avatar
1 vote
1 answer
991 views

How do I get a Metal texture ID to render to it with Ogre?

I looked in the documentation, but I don't know how to get the texture ID. ...
andre ahmed's user avatar
3 votes
0 answers
186 views

Are GPU drivers hand optimized for specific games using low-level APIs?

The GPU drivers often have slightly different behavior depending on game or program, which is using them. It optimizes performance, bypasses bugs and improves overall experience in popular games, ...
CodeSandwich's user avatar
2 votes
2 answers
320 views

How do I use delta time time-stepping in a triple-buffering scenario?

I am creating a graphics application in Metal. One of the things we are suggested to do is to use triple buffers in order to allow for the GPU and CPU to work more in parallel. Essentially instead of ...
J.Doe's user avatar
  • 289
1 vote
0 answers
242 views

Using a MTLTexture as the environment map of a SCNScene

I want to set a MTLTexture object as the environment map of a scene, as it seems to be possible according to the documentation. I can set the environment map to be ...
halileohalilei's user avatar
2 votes
2 answers
675 views

IOS very simple 2d engine/api rendering showdown [closed]

So after taking some time running through a course, I believe I have enough experience with referring back to the course how to make the game I wish to all apart from one thing. How to draw the game ...
user avatar
1 vote
1 answer
836 views

What is the shader format for Metal shaders shipped with iOS applications?

I am interested in analyzing existing shaders implemented using Apple's Metal framework. From my previous experience on other platforms with OpenGL, I have found that applications sometimes bundle ...
MrSynAckSter's user avatar
1 vote
1 answer
3k views

How Apple Metal API distinguishes uniforms from vertices buffers?

I am not sure how metal distinguishes uniforms from vertices buffers? As far as I know code for passing uniforms in buffers are the same like for vertices: ...
user avatar