Hello @mc ,
If you want something close to the reference image, I would recommend creating the models and scene layout in other 3D software first, then using Direct3D to render it and handle rotation and click interaction. For lighting, in Direct3D you usually add it in the shaders.
This is a minimal sample from my side. You can follow a similar approach to add lighting in your project:
cbuffer LightBuffer : register(b0)
{
float3 lightDir;
float pad;
float4 lightColor;
};
struct PS_INPUT
{
float4 pos : SV_POSITION;
float3 normal : NORMAL;
};
float4 main(PS_INPUT input) : SV_TARGET
{
float3 n = normalize(input.normal);
float3 l = normalize(-lightDir);
float diffuse = max(dot(n, l), 0.0f);
return lightColor * diffuse;
}
I hope this information helps with your question. If you found my response helpful, you can follow this guide to leave feedback.
Thank you.