Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ImDrawList UserCallback support #1526

Conversation

Soreepeong
Copy link
Contributor

@Soreepeong Soreepeong commented Nov 11, 2023

Commits need to be edited after merging ImGuiScene#11 first.

When reviewing, the relevant commit is the third commit. Four commit is for example purposes; it is to be removed before merging.

Also, did the following:

  • Add Dalamud.CorePlugin.json.
  • Expose DeviceContext from UiBuilder.
  • Expose DeviceNativePointer and DeviceContextNativePointer, due to SharpDX dependency types in Dalamud assembly not being exposed correctly to plugins, resulting in incompatible types across assemblies. Or, that's what I think what's going on, at least.

image

SamplerState Sampler : register(s0);
Texture2D Texture : register(t0);

struct PSInput {
    float4 position : SV_POSITION;
    float4 color : COLOR;
    float2 uv : TEXCOORD;
};

float4 main_ps(PSInput input) : SV_TARGET {
    const float4 color = Texture.Sample(Sampler, input.uv);
    switch (floor(input.uv.x)) {
        case 1: return float4(input.color.xyz, color.r);
        case 2: return float4(input.color.xyz, color.g);
        case 3: return float4(input.color.xyz, color.b);
        case 4: return float4(input.color.xyz, color.a);
        default: return input.color * color;
    }
}

test.fxc.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant