Skip to content
Discussion options

You must be logged in to vote

The main issue seems to be in HLSL files, which do not handle transparency. For example, to enable mesh transparency PSMain in RenderMeshes.hlsl should be changed to:

// TRANSPARENCY CHANGE: Modified return type from float3 to float4 to include alpha
float4 PSMain(PSInput input) : SV_Target0
{
    float3 dpdx = ddx(input.ToAABB);
    float3 dpdy = ddy(input.ToAABB);
    float3 normal = normalize(cross(dpdy, dpdx));
    float3 color = ShadeSurface(
       input.ToAABB, normal, UnpackR11G11B10_UNorm(input.PackedColor), dpdx, dpdy,
       input.InstancePosition, input.Orientation);

    // TRANSPARENCY CHANGE: Extract alpha from PackedColor and return float4 instead of float3
    // For RGBA…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RossNordby
Comment options

Answer selected by kkkmail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants