mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 13:53:40 +01:00
* Implement DrawListTextureWrap * Fix unloading * minor fixes * Add CreateFromClipboardAsync --------- Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
40 lines
990 B
HLSL
40 lines
990 B
HLSL
#include "DrawListTexture.Renderer.Common.hlsl"
|
|
|
|
struct ImDrawVert {
|
|
float2 position : POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
float4 color : COLOR0;
|
|
};
|
|
|
|
struct VsData {
|
|
float4 position : SV_POSITION;
|
|
float2 uv : TEXCOORD0;
|
|
float4 color : COLOR0;
|
|
};
|
|
|
|
struct PsData {
|
|
float4 color : COLOR0;
|
|
};
|
|
|
|
Texture2D s_texture : register(t0);
|
|
SamplerState s_sampler : register(s0);
|
|
RWTexture2D<float4> s_output : register(u1);
|
|
|
|
VsData vs_main(const ImDrawVert idv) {
|
|
VsData result;
|
|
result.position = mul(g_view, float4(idv.position, 0, 1));
|
|
result.uv = idv.uv;
|
|
result.color = idv.color;
|
|
return result;
|
|
}
|
|
|
|
float4 ps_main(const VsData vd) : SV_TARGET {
|
|
return s_texture.Sample(s_sampler, vd.uv) * vd.color;
|
|
}
|
|
|
|
/*
|
|
|
|
fxc /Zi /T vs_5_0 /E vs_main /Fo DrawListTexture.Renderer.DrawToPremul.vs.bin DrawListTexture.Renderer.DrawToPremul.hlsl
|
|
fxc /Zi /T ps_5_0 /E ps_main /Fo DrawListTexture.Renderer.DrawToPremul.ps.bin DrawListTexture.Renderer.DrawToPremul.hlsl
|
|
|
|
*/
|