@warrenm What’s offset really? Can you read instead of sample, and does that make a difference? If grid positions are integers, not useful?
-
-
-
@jessyMeow It would make a difference, but I need sampling behavior (eg, clamp to edge) when “reading” out of bounds -
@jessyMeow but yeah, the coordinates are always integral in practice
End of conversation
New conversation -
-
-
@warrenm So the conversion of gridPosition is the expensive one if you put it on a line by itself? Which device are you sampling on? -
@alexkan Crucially, whichever conversion happens *first* (gridPosition or offset) is much slower. iPhone 6. Can provide project. -
@warrenm Yes, seeing the project would be helpful. Sounds like kernel launch overhead is getting grouped in with that first line, though. -
@alexkan Definitely occurred to me. See image_desaturate in the sample code for this posthttp://metalbyexample.com/metal-performance-shaders-in-swift/ …
End of conversation
New conversation -
-
-
@warrenm how were you able to measure the cost like that? -
@mhorga_ Capture GPU Frame / Update Shaders ftw
End of conversation
New conversation -
-
-
@warrenm looks suspicious. The conversions could be done CPU side once instead of per pixel. But the next line is a dependent read which is -
@_psonice Yeah, the dependent read sucks and is totally mandated by the API. Also, no way to issue the transform client-side
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.