Hello experts, I have implemented 3d guassian splating rendering through the CompositorServices framework, but I want to port it to the RealityKit framework. I am not sure whether RealityKit meets the requirements.
In order to port the code, I need to render a large number of instanced planes (it is necessary to support instantiated Mesh), and completely custom vertex shader and fragment shader code, including using instance_id and discarding pixels (Call the discard_fragment method).
Some Metal code snippets:
vertex ColorInOut splatVertexShader(uint vertexID [[vertex_id]],
uint instanceID [[instance_id]],
ushort amp_id [[amplification_id]],
constant Splat* splatArray [[ buffer(BufferIndexSplat) ]],
constant UniformsArray & uniformsArray [[ buffer(BufferIndexUniforms) ]],
constant int32_t* splatIndices [[ buffer(BufferIndexSplatIndex) ]])
{
// ... (do some calculations)
}
fragment half4 splatFragmentShader(ColorInOut in [[stage_in]])
{
// ...
if (/* a certain condition */) {
discard_fragment();
}
}
I have learned that CustomMaterial does not support vision, and Shader Graph does not support custom vertex/fragment shader code. I also noticed the LowLevelMesh interface, but I didn't find any sample code with custom shader code, so it's not clear whether it would be able to achieve what I need.
Can these requirements be met using reality?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello experts, I'm trying to implement a material with custom shader code, but I saw that visionOS doesn't allow you to inject custom Metal functions or use CustomMaterial like iOS/macOS, nor can you directly write Metal Shading Language (.metal) and use it through ShaderGraphMaterial. So my question is, if i want to implement your own shader code, how should i do it?
I want to use reality to create a custom material that can use my own shader and support Mesh instancing (for rendering 3D Gaussian splating), but I found that CustomMaterial does not support VisionOS. Is there any other interface that can achieve my needs? Where can I find examples?
Topic:
Graphics & Games
SubTopic:
RealityKit
I want to use reality to create a custom material that can use my own shader and support Mesh instancing (for rendering 3D Gaussian splating), but I found that CustomMaterial does not support VisionOS. Is there any other interface that can achieve my needs? Where can I find examples?
Topic:
Graphics & Games
SubTopic:
RealityKit