Yes, essentially mmap, but rather than creating and drawing to the textures on every frame, I'd instead keep one texture in memory and have multiple pointers to the bitmap data. On each frame, I'd draw to that one texture in a loop over the various pointers. Would this be possible/efficient?
Post
Replies
Boosts
Views
Activity
Is there a way to have the second text view become the first responder, but still keep the selected portion of the first text view highlighted?
Actually, when trying to compile "self.color = .genericGrayscale" I get an error that it's not available in Mac Catalyst. Is there any alternative method of achieving this for the iPad/Mac Catalyst?
I'm not seeing this property on MTKView, is it for some reason not available when subclassing? So far I've only seen "(self.layer as? CAMetalLayer)?.colorspace" but that doesn't work when setting it to grayscale, and when using CMYK it turns everything to black/white.
What do you mean by it won't be a simple string? And if by parsing individual tag-like parts you mean the brush properties (i.e. spacing, hardness, etc.) then yes, that is what I'm trying to parse. I don't have much to work from in terms of the file format since there's very little documentation. I assumed that the value must come immediately after by creating a few test brushes with slightly different values and seeing how the string output changes. I also referred to this question which gives a very general overview of the format: https://community.adobe.com/t5/photoshop-ecosystem-discussions/reading-writing-and-previewing-abr-files-brushes-how/m-p/8536998.
Here is the hex dump that I get. The Data() object comes from the "contentsOf(url)" function when trying to read a .abr brush file.
00446d74 72556e74 46235078 6c405400 00000000 00000000 00416e67 6c556e74 4623416e 67405180 00000000 00000000 00526e64 6e556e74 46235072 63404400 00000000 00000000 004e6d20 20544558 54000000 11004300 6800
Thanks for your response! I actually ended up figuring it out, I was simply using the wrong identifier in my Document model so it could not recongize my app.
The code is pretty detailed and might not make sense on its own. Nonetheless it contains about 7 if-statements where a few of the conditions sample other textures. What is function specialization? I've heard of function constants but am not entirely sure I understand them completely. Wouldn't function constants just be more if-statements?
The draw call will sample 1-2 textures at any given time and write back to two different color attachments. There are also a good amount of if-statements in the fragment shader. The tile shader, at the moment, runs immediately after the draw call and uses one of the color attachments from the draw call to change the color of the pixel. There is defintely more work being done by the draw call approach, but I'm wondering if it can be sped up by using a tile shader to display the content instead.
Thanks for your suggestions, both approaches seem very helpful. As for the first approach, how can a kernel-based tile shader read the color attachment of both the outer and inner render pass and if so is there any documentation on this?
For the second approach, I'm also confused as to how I can access color attachments from different render passes through a single shader. Would it look something like this:
fragment ColorIO myFragment(ColorIO innerRenderPassFragment, ColorIO outerRenderPassFragment)
{
...
}