I’m trying to create a custom component which owns a render target or dynamic texture, and can render a StaticMesh into it at runtime.
What I’m looking to do is relatively simple, all I need is the mesh data, and an input RGBA float16 texture, no materials/other textures, no lighting and effects of any kind. Just a custom vertex and pixel shader.
If I was doing this in straight D3D11, it wouldn’t be very hard, but trying to figure out how to accomplish this in-engine has me a bit clueless.
I’ve created a custom component with modified shaders similar to USplineMeshComponent before, so I can figure out how to get my inputs to the vertex shader, but I mostly got it to work because I could almost copy the supporting classes.
I’ve tried looking at FCanvas since it does drawing to a render target, but I’m having a hard time discerning anything from it…
Does anyone have an idea how I could go about this? I’ve found this for updating a render target, so I could in theory just pull the LOD0 from the static mesh, do my thing in plain D3D, then copy the result back, but that feels dirty and I’d rather do it with the engine.