[PATCH 5/5] d2d1: Use the "world" position instead of the render target position in the pixel shader.
Henri Verbeet
hverbeet at codeweavers.com
Sat Sep 23 06:37:01 CDT 2017
This slightly simplifies the implementation of bitmap brushes, since the
render target transformation no longer needs to be undone. More importantly,
it does the same for gradient brushes.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/d2d1/brush.c | 15 +-
dlls/d2d1/render_target.c | 494 +++++++++++++++++++++++++---------------------
2 files changed, 275 insertions(+), 234 deletions(-)
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
index 9951803..cc1a020 100644
--- a/dlls/d2d1/brush.c
+++ b/dlls/d2d1/brush.c
@@ -771,8 +771,8 @@ static BOOL d2d_brush_fill_cb(const struct d2d_brush *brush,
const struct d2d_d3d_render_target *render_target, struct d2d_brush_cb *cb)
{
struct d2d_bitmap *bitmap;
- D2D_MATRIX_3X2_F w, b;
D2D1_COLOR_F *colour;
+ D2D_MATRIX_3X2_F b;
float dpi_scale, d;
if (!brush)
@@ -799,17 +799,6 @@ static BOOL d2d_brush_fill_cb(const struct d2d_brush *brush,
case D2D_BRUSH_TYPE_BITMAP:
bitmap = brush->u.bitmap.bitmap;
- /* Scale for dpi. */
- w = render_target->drawing_state.transform;
- dpi_scale = render_target->desc.dpiX / 96.0f;
- w._11 *= dpi_scale;
- w._21 *= dpi_scale;
- w._31 *= dpi_scale;
- dpi_scale = render_target->desc.dpiY / 96.0f;
- w._12 *= dpi_scale;
- w._22 *= dpi_scale;
- w._32 *= dpi_scale;
-
/* Scale for bitmap size and dpi. */
b = brush->transform;
dpi_scale = bitmap->pixel_size.width * (96.0f / bitmap->dpi_x);
@@ -819,8 +808,6 @@ static BOOL d2d_brush_fill_cb(const struct d2d_brush *brush,
b._12 *= dpi_scale;
b._22 *= dpi_scale;
- d2d_matrix_multiply(&b, &w);
-
/* Invert the matrix. (Because the matrix is applied to the
* sampling coordinates. I.e., to scale the bitmap by 2 we need to
* divide the coordinates by 2.) */
diff --git a/dlls/d2d1/render_target.c b/dlls/d2d1/render_target.c
index 0ef3442..cd1c6ea 100644
--- a/dlls/d2d1/render_target.c
+++ b/dlls/d2d1/render_target.c
@@ -776,44 +776,50 @@ static void d2d_rt_fill_geometry(struct d2d_d3d_render_target *render_target,
ID3D10Buffer *ib, *vb, *vs_cb, *ps_cb;
D3D10_SUBRESOURCE_DATA buffer_data;
D3D10_BUFFER_DESC buffer_desc;
- D2D1_MATRIX_3X2_F w, g;
+ D2D1_MATRIX_3X2_F *w;
float tmp_x, tmp_y;
HRESULT hr;
struct
{
- float _11, _21, _31, pad0;
- float _12, _22, _32, pad1;
- } transform;
-
- tmp_x = (2.0f * render_target->desc.dpiX) / (96.0f * render_target->pixel_size.width);
- tmp_y = -(2.0f * render_target->desc.dpiY) / (96.0f * render_target->pixel_size.height);
- w = render_target->drawing_state.transform;
- w._11 *= tmp_x;
- w._21 *= tmp_x;
- w._31 = w._31 * tmp_x - 1.0f;
- w._12 *= tmp_y;
- w._22 *= tmp_y;
- w._32 = w._32 * tmp_y + 1.0f;
-
- g = geometry->transform;
- d2d_matrix_multiply(&g, &w);
-
- transform._11 = g._11;
- transform._21 = g._21;
- transform._31 = g._31;
- transform.pad0 = 0.0f;
- transform._12 = g._12;
- transform._22 = g._22;
- transform._32 = g._32;
- transform.pad1 = 0.0f;
-
- buffer_desc.ByteWidth = sizeof(transform);
+ struct
+ {
+ float _11, _21, _31, pad0;
+ float _12, _22, _32, pad1;
+ } transform_geometry;
+ struct d2d_vec4 transform_rtx;
+ struct d2d_vec4 transform_rty;
+ } vs_cb_data;
+
+ vs_cb_data.transform_geometry._11 = geometry->transform._11;
+ vs_cb_data.transform_geometry._21 = geometry->transform._21;
+ vs_cb_data.transform_geometry._31 = geometry->transform._31;
+ vs_cb_data.transform_geometry.pad0 = 0.0f;
+ vs_cb_data.transform_geometry._12 = geometry->transform._12;
+ vs_cb_data.transform_geometry._22 = geometry->transform._22;
+ vs_cb_data.transform_geometry._32 = geometry->transform._32;
+ vs_cb_data.transform_geometry.pad1 = 0.0f;
+
+ w = &render_target->drawing_state.transform;
+
+ tmp_x = render_target->desc.dpiX / 96.0f;
+ vs_cb_data.transform_rtx.x = w->_11 * tmp_x;
+ vs_cb_data.transform_rtx.y = w->_21 * tmp_x;
+ vs_cb_data.transform_rtx.z = w->_31 * tmp_x;
+ vs_cb_data.transform_rtx.w = 2.0f / render_target->pixel_size.width;
+
+ tmp_y = render_target->desc.dpiY / 96.0f;
+ vs_cb_data.transform_rty.x = w->_12 * tmp_y;
+ vs_cb_data.transform_rty.y = w->_22 * tmp_y;
+ vs_cb_data.transform_rty.z = w->_32 * tmp_y;
+ vs_cb_data.transform_rty.w = -2.0f / render_target->pixel_size.height;
+
+ buffer_desc.ByteWidth = sizeof(vs_cb_data);
buffer_desc.Usage = D3D10_USAGE_DEFAULT;
buffer_desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER;
buffer_desc.CPUAccessFlags = 0;
buffer_desc.MiscFlags = 0;
- buffer_data.pSysMem = &transform;
+ buffer_data.pSysMem = &vs_cb_data;
buffer_data.SysMemPitch = 0;
buffer_data.SysMemSlicePitch = 0;
@@ -1513,21 +1519,33 @@ static void STDMETHODCALLTYPE d2d_d3d_render_target_Clear(ID2D1RenderTarget *ifa
D2D1_COLOR_F *c;
HRESULT hr;
- static const float transform[] =
+ static const struct
{
- 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, -1.0f, 0.0f, 0.0f,
+ struct
+ {
+ float _11, _21, _31, pad0;
+ float _12, _22, _32, pad1;
+ } transform_geometry;
+ struct d2d_vec4 transform_rtx;
+ struct d2d_vec4 transform_rty;
+ }
+ vs_cb_data =
+ {
+ {1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f},
+ {1.0f, 0.0f, 1.0f, 1.0f},
+ {0.0f, 1.0f, 1.0f, -1.0f},
};
TRACE("iface %p, colour %p.\n", iface, colour);
- buffer_desc.ByteWidth = sizeof(transform);
+ buffer_desc.ByteWidth = sizeof(vs_cb_data);
buffer_desc.Usage = D3D10_USAGE_DEFAULT;
buffer_desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER;
buffer_desc.CPUAccessFlags = 0;
buffer_desc.MiscFlags = 0;
- buffer_data.pSysMem = transform;
+ buffer_data.pSysMem = &vs_cb_data;
buffer_data.SysMemPitch = 0;
buffer_data.SysMemSlicePitch = 0;
@@ -2172,9 +2190,10 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
struct output
{
- float4 position : SV_POSITION;
+ float2 p : WORLD_POSITION;
float4 b : BEZIER;
nointerpolation float2x2 stroke_transform : STROKE_TRANSFORM;
+ float4 position : SV_POSITION;
};
/* The lines PₚᵣₑᵥP₀ and P₀Pₙₑₓₜ, both offset by ±½w, intersect each other at:
@@ -2206,58 +2225,61 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
o.b = float4(0.0, 0.0, 0.0, 0.0);
- position = mul(float3(position, 1.0f), transform_geometry) + stroke_width * 0.5f * q_i;
- position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(position, 1.0f))
+ o.p = mul(float3(position, 1.0f), transform_geometry) + stroke_width * 0.5f * q_i;
+ position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(o.p, 1.0f))
* float2(transform_rtx.w, transform_rty.w);
o.position = float4(position + float2(-1.0f, 1.0f), 0.0f, 1.0f);
}
#endif
- 0x43425844, 0x02efddb1, 0x64c7aa76, 0x9bfda1b3, 0xaf692726, 0x00000001, 0x000005c0, 0x00000003,
- 0x0000002c, 0x00000098, 0x0000012c, 0x4e475349, 0x00000064, 0x00000003, 0x00000008, 0x00000050,
+ 0x43425844, 0xfb16cd75, 0xf5ec3e80, 0xceacf250, 0x91d29d18, 0x00000001, 0x00000608, 0x00000003,
+ 0x0000002c, 0x00000098, 0x00000154, 0x4e475349, 0x00000064, 0x00000003, 0x00000008, 0x00000050,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x00000059, 0x00000000, 0x00000000,
0x00000003, 0x00000001, 0x00000303, 0x0000005e, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
- 0x00000303, 0x49534f50, 0x4e4f4954, 0x45525000, 0x454e0056, 0xab005458, 0x4e47534f, 0x0000008c,
- 0x00000004, 0x00000008, 0x00000068, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f,
- 0x00000074, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x0000007b, 0x00000000,
- 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x0000007b, 0x00000001, 0x00000000, 0x00000003,
- 0x00000003, 0x00000c03, 0x505f5653, 0x5449534f, 0x004e4f49, 0x495a4542, 0x53005245, 0x4b4f5254,
- 0x52545f45, 0x46534e41, 0x004d524f, 0x52444853, 0x0000048c, 0x00010040, 0x00000123, 0x04000059,
- 0x00208e46, 0x00000000, 0x00000004, 0x0300005f, 0x00101032, 0x00000000, 0x0300005f, 0x00101032,
- 0x00000001, 0x0300005f, 0x00101032, 0x00000002, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
- 0x03000065, 0x001020f2, 0x00000001, 0x03000065, 0x00102032, 0x00000002, 0x03000065, 0x00102032,
- 0x00000003, 0x02000068, 0x00000003, 0x0800000f, 0x00100012, 0x00000000, 0x00208046, 0x00000000,
- 0x00000000, 0x00101046, 0x00000002, 0x0800000f, 0x00100022, 0x00000000, 0x00208046, 0x00000000,
- 0x00000001, 0x00101046, 0x00000002, 0x0700000f, 0x00100042, 0x00000000, 0x00100046, 0x00000000,
- 0x00100046, 0x00000000, 0x05000044, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x07000038,
- 0x00100032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x0800000f, 0x00100012,
- 0x00000001, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000001, 0x0800000f, 0x00100022,
- 0x00000001, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000001, 0x0700000f, 0x00100042,
- 0x00000000, 0x00100046, 0x00000001, 0x00100046, 0x00000001, 0x05000044, 0x00100042, 0x00000000,
- 0x0010002a, 0x00000000, 0x07000038, 0x00100032, 0x00000001, 0x00100aa6, 0x00000000, 0x00100046,
- 0x00000001, 0x06000036, 0x001000c2, 0x00000001, 0x80100556, 0x00000041, 0x00000001, 0x0700000f,
- 0x00100042, 0x00000000, 0x00100a26, 0x00000001, 0x00100046, 0x00000000, 0x0700000f, 0x00100012,
- 0x00000000, 0x00100046, 0x00000001, 0x00100046, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
- 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x0800000e, 0x00100012, 0x00000000, 0x8010002a,
- 0x00000041, 0x00000000, 0x0010000a, 0x00000000, 0x09000032, 0x00100032, 0x00000000, 0x00100006,
- 0x00000000, 0x00100046, 0x00000001, 0x00100f36, 0x00000001, 0x08000038, 0x00100042, 0x00000000,
- 0x0020803a, 0x00000000, 0x00000001, 0x00004001, 0x3f000000, 0x05000036, 0x00100032, 0x00000001,
- 0x00101046, 0x00000000, 0x05000036, 0x00100042, 0x00000001, 0x00004001, 0x3f800000, 0x08000010,
- 0x00100012, 0x00000002, 0x00100246, 0x00000001, 0x00208246, 0x00000000, 0x00000000, 0x08000010,
- 0x00100022, 0x00000002, 0x00100246, 0x00000001, 0x00208246, 0x00000000, 0x00000001, 0x09000032,
- 0x00100032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000002,
- 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x08000010, 0x00100082, 0x00000000,
- 0x00208246, 0x00000000, 0x00000002, 0x00100246, 0x00000000, 0x08000010, 0x00100012, 0x00000000,
- 0x00208246, 0x00000000, 0x00000003, 0x00100246, 0x00000000, 0x08000038, 0x00100022, 0x00000000,
- 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000003, 0x08000038, 0x00100012, 0x00000000,
- 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000002, 0x0a000000, 0x00102032, 0x00000000,
- 0x00100046, 0x00000000, 0x00004002, 0xbf800000, 0x3f800000, 0x00000000, 0x00000000, 0x08000036,
- 0x001020c2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x08000036,
- 0x001020f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x06000036,
- 0x00100032, 0x00000000, 0x00208046, 0x00000000, 0x00000002, 0x06000036, 0x001000c2, 0x00000000,
- 0x00208406, 0x00000000, 0x00000003, 0x08000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000,
- 0x00208ff6, 0x00000000, 0x00000001, 0x0a000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000,
- 0x00004002, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x05000036, 0x00102032, 0x00000002,
- 0x00100086, 0x00000000, 0x05000036, 0x00102032, 0x00000003, 0x001005d6, 0x00000000, 0x0100003e,
+ 0x00000303, 0x49534f50, 0x4e4f4954, 0x45525000, 0x454e0056, 0xab005458, 0x4e47534f, 0x000000b4,
+ 0x00000005, 0x00000008, 0x00000080, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000c03,
+ 0x0000008f, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x00000096, 0x00000000,
+ 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x00000096, 0x00000001, 0x00000000, 0x00000003,
+ 0x00000003, 0x00000c03, 0x000000a7, 0x00000000, 0x00000001, 0x00000003, 0x00000004, 0x0000000f,
+ 0x4c524f57, 0x4f505f44, 0x49544953, 0x42004e4f, 0x45495a45, 0x54530052, 0x454b4f52, 0x4152545f,
+ 0x4f46534e, 0x53004d52, 0x4f505f56, 0x49544953, 0xab004e4f, 0x52444853, 0x000004ac, 0x00010040,
+ 0x0000012b, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, 0x0300005f, 0x00101032, 0x00000000,
+ 0x0300005f, 0x00101032, 0x00000001, 0x0300005f, 0x00101032, 0x00000002, 0x03000065, 0x00102032,
+ 0x00000000, 0x03000065, 0x001020f2, 0x00000001, 0x03000065, 0x00102032, 0x00000002, 0x03000065,
+ 0x00102032, 0x00000003, 0x04000067, 0x001020f2, 0x00000004, 0x00000001, 0x02000068, 0x00000003,
+ 0x0800000f, 0x00100012, 0x00000000, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000002,
+ 0x0800000f, 0x00100022, 0x00000000, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000002,
+ 0x0700000f, 0x00100042, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x05000044,
+ 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x07000038, 0x00100032, 0x00000000, 0x00100aa6,
+ 0x00000000, 0x00100046, 0x00000000, 0x0800000f, 0x00100012, 0x00000001, 0x00208046, 0x00000000,
+ 0x00000000, 0x00101046, 0x00000001, 0x0800000f, 0x00100022, 0x00000001, 0x00208046, 0x00000000,
+ 0x00000001, 0x00101046, 0x00000001, 0x0700000f, 0x00100042, 0x00000000, 0x00100046, 0x00000001,
+ 0x00100046, 0x00000001, 0x05000044, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x07000038,
+ 0x00100032, 0x00000001, 0x00100aa6, 0x00000000, 0x00100046, 0x00000001, 0x06000036, 0x001000c2,
+ 0x00000001, 0x80100556, 0x00000041, 0x00000001, 0x0700000f, 0x00100042, 0x00000000, 0x00100a26,
+ 0x00000001, 0x00100046, 0x00000000, 0x0700000f, 0x00100012, 0x00000000, 0x00100046, 0x00000001,
+ 0x00100046, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001,
+ 0x3f800000, 0x0800000e, 0x00100012, 0x00000000, 0x8010002a, 0x00000041, 0x00000000, 0x0010000a,
+ 0x00000000, 0x09000032, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00100046, 0x00000001,
+ 0x00100f36, 0x00000001, 0x08000038, 0x00100042, 0x00000000, 0x0020803a, 0x00000000, 0x00000001,
+ 0x00004001, 0x3f000000, 0x05000036, 0x00100032, 0x00000001, 0x00101046, 0x00000000, 0x05000036,
+ 0x00100042, 0x00000001, 0x00004001, 0x3f800000, 0x08000010, 0x00100012, 0x00000002, 0x00100246,
+ 0x00000001, 0x00208246, 0x00000000, 0x00000000, 0x08000010, 0x00100022, 0x00000002, 0x00100246,
+ 0x00000001, 0x00208246, 0x00000000, 0x00000001, 0x09000032, 0x00100032, 0x00000000, 0x00100aa6,
+ 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000002, 0x05000036, 0x00102032, 0x00000000,
+ 0x00100046, 0x00000000, 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x06000036, 0x00100032, 0x00000001, 0x00208046, 0x00000000, 0x00000002,
+ 0x06000036, 0x001000c2, 0x00000001, 0x00208406, 0x00000000, 0x00000003, 0x08000038, 0x001000f2,
+ 0x00000001, 0x00100e46, 0x00000001, 0x00208ff6, 0x00000000, 0x00000001, 0x0a000038, 0x001000f2,
+ 0x00000001, 0x00100e46, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000,
+ 0x05000036, 0x00102032, 0x00000002, 0x00100086, 0x00000001, 0x05000036, 0x00102032, 0x00000003,
+ 0x001005d6, 0x00000001, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x08000010,
+ 0x00100082, 0x00000000, 0x00208246, 0x00000000, 0x00000002, 0x00100246, 0x00000000, 0x08000010,
+ 0x00100012, 0x00000000, 0x00208246, 0x00000000, 0x00000003, 0x00100246, 0x00000000, 0x08000038,
+ 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000003, 0x08000038,
+ 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000002, 0x0a000000,
+ 0x00102032, 0x00000004, 0x00100046, 0x00000000, 0x00004002, 0xbf800000, 0x3f800000, 0x00000000,
+ 0x00000000, 0x08000036, 0x001020c2, 0x00000004, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
+ 0x3f800000, 0x0100003e,
};
/* ⎡p0.x p0.y 1⎤
* A = ⎢p1.x p1.y 1⎥
@@ -2286,9 +2308,10 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
struct output
{
- float4 position : SV_POSITION;
+ float2 p : WORLD_POSITION;
float4 b : BEZIER;
nointerpolation float2x2 stroke_transform : STROKE_TRANSFORM;
+ float4 position : SV_POSITION;
};
void main(float2 position : POSITION, float2 p0 : P0, float2 p1 : P1, float2 p2 : P2,
@@ -2334,176 +2357,207 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
o.b.y = dot(v_p, p1);
}
- position = mul(float3(position, 1.0f), transform_geometry) + stroke_width * q_i;
- position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(position, 1.0f))
+ o.p = mul(float3(position, 1.0f), transform_geometry) + stroke_width * q_i;
+ position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(o.p, 1.0f))
* float2(transform_rtx.w, transform_rty.w);
o.position = float4(position + float2(-1.0f, 1.0f), 0.0f, 1.0f);
}
#endif
- 0x43425844, 0xe65d4bd7, 0x8fdb9a5b, 0xd62a5d61, 0x55d20218, 0x00000001, 0x00000a9c, 0x00000003,
- 0x0000002c, 0x000000e4, 0x00000178, 0x4e475349, 0x000000b0, 0x00000006, 0x00000008, 0x00000098,
+ 0x43425844, 0x7ff88ce9, 0xd75cb064, 0x30396183, 0xca64489b, 0x00000001, 0x00000ae4, 0x00000003,
+ 0x0000002c, 0x000000e4, 0x000001a0, 0x4e475349, 0x000000b0, 0x00000006, 0x00000008, 0x00000098,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x000000a1, 0x00000000, 0x00000000,
0x00000003, 0x00000001, 0x00000303, 0x000000a1, 0x00000001, 0x00000000, 0x00000003, 0x00000002,
0x00000303, 0x000000a1, 0x00000002, 0x00000000, 0x00000003, 0x00000003, 0x00000303, 0x000000a3,
0x00000000, 0x00000000, 0x00000003, 0x00000004, 0x00000303, 0x000000a8, 0x00000000, 0x00000000,
0x00000003, 0x00000005, 0x00000303, 0x49534f50, 0x4e4f4954, 0x50005000, 0x00564552, 0x5458454e,
- 0xababab00, 0x4e47534f, 0x0000008c, 0x00000004, 0x00000008, 0x00000068, 0x00000000, 0x00000001,
- 0x00000003, 0x00000000, 0x0000000f, 0x00000074, 0x00000000, 0x00000000, 0x00000003, 0x00000001,
- 0x0000000f, 0x0000007b, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x0000007b,
- 0x00000001, 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x505f5653, 0x5449534f, 0x004e4f49,
- 0x495a4542, 0x53005245, 0x4b4f5254, 0x52545f45, 0x46534e41, 0x004d524f, 0x52444853, 0x0000091c,
- 0x00010040, 0x00000247, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, 0x0300005f, 0x00101032,
- 0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x0300005f, 0x00101032, 0x00000002, 0x0300005f,
- 0x00101032, 0x00000003, 0x0300005f, 0x00101032, 0x00000004, 0x0300005f, 0x00101032, 0x00000005,
- 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, 0x03000065,
- 0x00102032, 0x00000002, 0x03000065, 0x00102032, 0x00000003, 0x02000068, 0x00000005, 0x0800000f,
- 0x00100012, 0x00000000, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000005, 0x0800000f,
- 0x00100022, 0x00000000, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000005, 0x0700000f,
- 0x00100042, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x05000044, 0x00100042,
- 0x00000000, 0x0010002a, 0x00000000, 0x07000038, 0x00100032, 0x00000000, 0x00100aa6, 0x00000000,
- 0x00100046, 0x00000000, 0x0800000f, 0x00100012, 0x00000001, 0x00208046, 0x00000000, 0x00000000,
- 0x00101046, 0x00000004, 0x0800000f, 0x00100022, 0x00000001, 0x00208046, 0x00000000, 0x00000001,
- 0x00101046, 0x00000004, 0x0700000f, 0x00100042, 0x00000000, 0x00100046, 0x00000001, 0x00100046,
- 0x00000001, 0x05000044, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x07000038, 0x00100032,
- 0x00000001, 0x00100aa6, 0x00000000, 0x00100046, 0x00000001, 0x06000036, 0x001000c2, 0x00000001,
- 0x80100556, 0x00000041, 0x00000001, 0x0700000f, 0x00100042, 0x00000000, 0x00100a26, 0x00000001,
- 0x00100046, 0x00000000, 0x0700000f, 0x00100012, 0x00000000, 0x00100046, 0x00000001, 0x00100046,
- 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000,
- 0x0800000e, 0x00100012, 0x00000000, 0x8010002a, 0x00000041, 0x00000000, 0x0010000a, 0x00000000,
- 0x09000032, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00100046, 0x00000001, 0x00100f36,
- 0x00000001, 0x05000036, 0x00100032, 0x00000001, 0x00101046, 0x00000000, 0x05000036, 0x00100042,
- 0x00000001, 0x00004001, 0x3f800000, 0x08000010, 0x00100012, 0x00000002, 0x00100246, 0x00000001,
- 0x00208246, 0x00000000, 0x00000000, 0x08000010, 0x00100022, 0x00000002, 0x00100246, 0x00000001,
- 0x00208246, 0x00000000, 0x00000001, 0x0a000032, 0x00100032, 0x00000001, 0x00208ff6, 0x00000000,
- 0x00000001, 0x00100046, 0x00000000, 0x00100046, 0x00000002, 0x05000036, 0x00100042, 0x00000001,
- 0x00004001, 0x3f800000, 0x08000010, 0x00100042, 0x00000000, 0x00208246, 0x00000000, 0x00000002,
- 0x00100246, 0x00000001, 0x08000010, 0x00100082, 0x00000000, 0x00208246, 0x00000000, 0x00000003,
- 0x00100246, 0x00000001, 0x08000038, 0x00100022, 0x00000001, 0x0010003a, 0x00000000, 0x0020803a,
- 0x00000000, 0x00000003, 0x08000038, 0x00100012, 0x00000001, 0x0010002a, 0x00000000, 0x0020803a,
- 0x00000000, 0x00000002, 0x0a000000, 0x00102032, 0x00000000, 0x00100046, 0x00000001, 0x00004002,
- 0xbf800000, 0x3f800000, 0x00000000, 0x00000000, 0x08000036, 0x001020c2, 0x00000000, 0x00004002,
- 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x0800000f, 0x00100012, 0x00000001, 0x00208046,
- 0x00000000, 0x00000000, 0x00101046, 0x00000000, 0x0800000f, 0x00100022, 0x00000001, 0x00208046,
- 0x00000000, 0x00000001, 0x00101046, 0x00000000, 0x0800000f, 0x00100012, 0x00000002, 0x00208046,
- 0x00000000, 0x00000000, 0x00101046, 0x00000001, 0x0800000f, 0x00100022, 0x00000002, 0x00208046,
- 0x00000000, 0x00000001, 0x00101046, 0x00000001, 0x08000000, 0x001000c2, 0x00000000, 0x00100406,
- 0x00000001, 0x80100406, 0x00000041, 0x00000002, 0x0a000032, 0x00100032, 0x00000000, 0x00208ff6,
- 0x00000000, 0x00000001, 0x00100046, 0x00000000, 0x00100ae6, 0x00000000, 0x0800000f, 0x00100012,
- 0x00000001, 0x00208046, 0x00000000, 0x00000002, 0x00100046, 0x00000000, 0x0800000f, 0x00100022,
- 0x00000001, 0x00208046, 0x00000000, 0x00000003, 0x00100046, 0x00000000, 0x0800000f, 0x00100012,
- 0x00000003, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000003, 0x0800000f, 0x00100022,
- 0x00000003, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000003, 0x08000000, 0x001000c2,
- 0x00000001, 0x80100406, 0x00000041, 0x00000002, 0x00100406, 0x00000003, 0x0800000f, 0x00100082,
- 0x00000000, 0x00208046, 0x00000000, 0x00000003, 0x00100ae6, 0x00000001, 0x06000036, 0x00100042,
- 0x00000002, 0x8010003a, 0x00000041, 0x00000000, 0x0800000f, 0x00100082, 0x00000002, 0x00208046,
- 0x00000000, 0x00000002, 0x00100ae6, 0x00000001, 0x0700000f, 0x00100082, 0x00000000, 0x00100ae6,
- 0x00000002, 0x00100ae6, 0x00000002, 0x05000044, 0x00100082, 0x00000000, 0x0010003a, 0x00000000,
- 0x07000038, 0x001000c2, 0x00000002, 0x00100ff6, 0x00000000, 0x00100ea6, 0x00000002, 0x0700000f,
- 0x00100022, 0x00000003, 0x00100046, 0x00000001, 0x00100ae6, 0x00000002, 0x06000036, 0x00100042,
- 0x00000000, 0x8010001a, 0x00000041, 0x00000000, 0x0800000f, 0x00100012, 0x00000001, 0x00208046,
- 0x00000000, 0x00000000, 0x00101046, 0x00000002, 0x0800000f, 0x00100022, 0x00000001, 0x00208046,
- 0x00000000, 0x00000001, 0x00101046, 0x00000002, 0x08000000, 0x00100032, 0x00000004, 0x80100046,
- 0x00000041, 0x00000002, 0x00100046, 0x00000001, 0x06000036, 0x00100042, 0x00000004, 0x8010001a,
- 0x00000041, 0x00000004, 0x0700000f, 0x00100022, 0x00000000, 0x00100a26, 0x00000004, 0x00100ae6,
- 0x00000001, 0x0d000032, 0x00100032, 0x00000001, 0x80100ae6, 0x00000041, 0x00000001, 0x00004002,
- 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00100046, 0x00000004, 0x0800000e, 0x00100032,
- 0x00000000, 0x80100a26, 0x00000041, 0x00000000, 0x00100556, 0x00000000, 0x0700000f, 0x00100012,
- 0x00000001, 0x00100046, 0x00000000, 0x00100046, 0x00000001, 0x0700000f, 0x00100022, 0x00000001,
- 0x00100046, 0x00000000, 0x00100046, 0x00000004, 0x0800000f, 0x00100012, 0x00000000, 0x00208046,
- 0x00000000, 0x00000002, 0x00100046, 0x00000004, 0x0800000f, 0x00100022, 0x00000000, 0x00208046,
- 0x00000000, 0x00000003, 0x00100046, 0x00000004, 0x0700000f, 0x00100012, 0x00000000, 0x00100046,
- 0x00000000, 0x00100ae6, 0x00000002, 0x07000031, 0x00100022, 0x00000000, 0x00004001, 0x00000000,
- 0x0010000a, 0x00000000, 0x07000031, 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x00004001,
- 0x00000000, 0x08000031, 0x00100012, 0x00000000, 0x8010000a, 0x00000081, 0x00000000, 0x00004001,
- 0x3f800000, 0x0800001e, 0x00100022, 0x00000000, 0x8010001a, 0x00000041, 0x00000000, 0x0010002a,
- 0x00000000, 0x0500002b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x07000038, 0x001000c2,
- 0x00000001, 0x00100ea6, 0x00000002, 0x00100556, 0x00000000, 0x08000036, 0x001000d2, 0x00000003,
- 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x09000037, 0x001020f2, 0x00000001,
- 0x00100006, 0x00000000, 0x00100e46, 0x00000003, 0x00100e46, 0x00000001, 0x06000036, 0x00100032,
- 0x00000000, 0x00208046, 0x00000000, 0x00000002, 0x06000036, 0x001000c2, 0x00000000, 0x00208406,
- 0x00000000, 0x00000003, 0x08000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6,
- 0x00000000, 0x00000001, 0x0a000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00004002,
- 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x05000036, 0x00102032, 0x00000002, 0x00100086,
- 0x00000000, 0x05000036, 0x00102032, 0x00000003, 0x001005d6, 0x00000000, 0x0100003e,
+ 0xababab00, 0x4e47534f, 0x000000b4, 0x00000005, 0x00000008, 0x00000080, 0x00000000, 0x00000000,
+ 0x00000003, 0x00000000, 0x00000c03, 0x0000008f, 0x00000000, 0x00000000, 0x00000003, 0x00000001,
+ 0x0000000f, 0x00000096, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x00000096,
+ 0x00000001, 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x000000a7, 0x00000000, 0x00000001,
+ 0x00000003, 0x00000004, 0x0000000f, 0x4c524f57, 0x4f505f44, 0x49544953, 0x42004e4f, 0x45495a45,
+ 0x54530052, 0x454b4f52, 0x4152545f, 0x4f46534e, 0x53004d52, 0x4f505f56, 0x49544953, 0xab004e4f,
+ 0x52444853, 0x0000093c, 0x00010040, 0x0000024f, 0x04000059, 0x00208e46, 0x00000000, 0x00000004,
+ 0x0300005f, 0x00101032, 0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x0300005f, 0x00101032,
+ 0x00000002, 0x0300005f, 0x00101032, 0x00000003, 0x0300005f, 0x00101032, 0x00000004, 0x0300005f,
+ 0x00101032, 0x00000005, 0x03000065, 0x00102032, 0x00000000, 0x03000065, 0x001020f2, 0x00000001,
+ 0x03000065, 0x00102032, 0x00000002, 0x03000065, 0x00102032, 0x00000003, 0x04000067, 0x001020f2,
+ 0x00000004, 0x00000001, 0x02000068, 0x00000006, 0x0800000f, 0x00100012, 0x00000000, 0x00208046,
+ 0x00000000, 0x00000000, 0x00101046, 0x00000005, 0x0800000f, 0x00100022, 0x00000000, 0x00208046,
+ 0x00000000, 0x00000001, 0x00101046, 0x00000005, 0x0700000f, 0x00100042, 0x00000000, 0x00100046,
+ 0x00000000, 0x00100046, 0x00000000, 0x05000044, 0x00100042, 0x00000000, 0x0010002a, 0x00000000,
+ 0x07000038, 0x00100032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x0800000f,
+ 0x00100012, 0x00000001, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000004, 0x0800000f,
+ 0x00100022, 0x00000001, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000004, 0x0700000f,
+ 0x00100042, 0x00000000, 0x00100046, 0x00000001, 0x00100046, 0x00000001, 0x05000044, 0x00100042,
+ 0x00000000, 0x0010002a, 0x00000000, 0x07000038, 0x00100032, 0x00000001, 0x00100aa6, 0x00000000,
+ 0x00100046, 0x00000001, 0x06000036, 0x001000c2, 0x00000001, 0x80100556, 0x00000041, 0x00000001,
+ 0x0700000f, 0x00100042, 0x00000000, 0x00100a26, 0x00000001, 0x00100046, 0x00000000, 0x0700000f,
+ 0x00100012, 0x00000000, 0x00100046, 0x00000001, 0x00100046, 0x00000000, 0x07000000, 0x00100012,
+ 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x0800000e, 0x00100012, 0x00000000,
+ 0x8010002a, 0x00000041, 0x00000000, 0x0010000a, 0x00000000, 0x09000032, 0x00100032, 0x00000000,
+ 0x00100006, 0x00000000, 0x00100046, 0x00000001, 0x00100f36, 0x00000001, 0x05000036, 0x00100032,
+ 0x00000001, 0x00101046, 0x00000000, 0x05000036, 0x00100042, 0x00000001, 0x00004001, 0x3f800000,
+ 0x08000010, 0x00100012, 0x00000002, 0x00100246, 0x00000001, 0x00208246, 0x00000000, 0x00000000,
+ 0x08000010, 0x00100022, 0x00000002, 0x00100246, 0x00000001, 0x00208246, 0x00000000, 0x00000001,
+ 0x0a000032, 0x00100032, 0x00000001, 0x00208ff6, 0x00000000, 0x00000001, 0x00100046, 0x00000000,
+ 0x00100046, 0x00000002, 0x05000036, 0x00102032, 0x00000000, 0x00100046, 0x00000001, 0x0800000f,
+ 0x00100012, 0x00000002, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000000, 0x0800000f,
+ 0x00100022, 0x00000002, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000000, 0x0800000f,
+ 0x00100012, 0x00000003, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000001, 0x0800000f,
+ 0x00100022, 0x00000003, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000001, 0x08000000,
+ 0x001000c2, 0x00000000, 0x00100406, 0x00000002, 0x80100406, 0x00000041, 0x00000003, 0x0a000032,
+ 0x00100032, 0x00000000, 0x00208ff6, 0x00000000, 0x00000001, 0x00100046, 0x00000000, 0x00100ae6,
+ 0x00000000, 0x0800000f, 0x00100012, 0x00000002, 0x00208046, 0x00000000, 0x00000002, 0x00100046,
+ 0x00000000, 0x0800000f, 0x00100022, 0x00000002, 0x00208046, 0x00000000, 0x00000003, 0x00100046,
+ 0x00000000, 0x0800000f, 0x00100012, 0x00000004, 0x00208046, 0x00000000, 0x00000000, 0x00101046,
+ 0x00000003, 0x0800000f, 0x00100022, 0x00000004, 0x00208046, 0x00000000, 0x00000001, 0x00101046,
+ 0x00000003, 0x08000000, 0x001000c2, 0x00000002, 0x80100406, 0x00000041, 0x00000003, 0x00100406,
+ 0x00000004, 0x0800000f, 0x00100082, 0x00000000, 0x00208046, 0x00000000, 0x00000003, 0x00100ae6,
+ 0x00000002, 0x06000036, 0x00100042, 0x00000003, 0x8010003a, 0x00000041, 0x00000000, 0x0800000f,
+ 0x00100082, 0x00000003, 0x00208046, 0x00000000, 0x00000002, 0x00100ae6, 0x00000002, 0x0700000f,
+ 0x00100082, 0x00000000, 0x00100ae6, 0x00000003, 0x00100ae6, 0x00000003, 0x05000044, 0x00100082,
+ 0x00000000, 0x0010003a, 0x00000000, 0x07000038, 0x001000c2, 0x00000003, 0x00100ff6, 0x00000000,
+ 0x00100ea6, 0x00000003, 0x0700000f, 0x00100022, 0x00000004, 0x00100046, 0x00000002, 0x00100ae6,
+ 0x00000003, 0x06000036, 0x00100042, 0x00000000, 0x8010001a, 0x00000041, 0x00000000, 0x0800000f,
+ 0x00100012, 0x00000002, 0x00208046, 0x00000000, 0x00000000, 0x00101046, 0x00000002, 0x0800000f,
+ 0x00100022, 0x00000002, 0x00208046, 0x00000000, 0x00000001, 0x00101046, 0x00000002, 0x08000000,
+ 0x00100032, 0x00000005, 0x80100046, 0x00000041, 0x00000003, 0x00100046, 0x00000002, 0x06000036,
+ 0x00100042, 0x00000005, 0x8010001a, 0x00000041, 0x00000005, 0x0700000f, 0x00100022, 0x00000000,
+ 0x00100a26, 0x00000005, 0x00100ae6, 0x00000002, 0x0d000032, 0x00100032, 0x00000002, 0x80100ae6,
+ 0x00000041, 0x00000002, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00100046,
+ 0x00000005, 0x0800000e, 0x00100032, 0x00000000, 0x80100a26, 0x00000041, 0x00000000, 0x00100556,
+ 0x00000000, 0x0700000f, 0x00100012, 0x00000002, 0x00100046, 0x00000000, 0x00100046, 0x00000002,
+ 0x0700000f, 0x00100022, 0x00000002, 0x00100046, 0x00000000, 0x00100046, 0x00000005, 0x0800000f,
+ 0x00100012, 0x00000000, 0x00208046, 0x00000000, 0x00000002, 0x00100046, 0x00000005, 0x0800000f,
+ 0x00100022, 0x00000000, 0x00208046, 0x00000000, 0x00000003, 0x00100046, 0x00000005, 0x0700000f,
+ 0x00100012, 0x00000000, 0x00100046, 0x00000000, 0x00100ae6, 0x00000003, 0x07000031, 0x00100022,
+ 0x00000000, 0x00004001, 0x00000000, 0x0010000a, 0x00000000, 0x07000031, 0x00100042, 0x00000000,
+ 0x0010000a, 0x00000000, 0x00004001, 0x00000000, 0x08000031, 0x00100012, 0x00000000, 0x8010000a,
+ 0x00000081, 0x00000000, 0x00004001, 0x3f800000, 0x0800001e, 0x00100022, 0x00000000, 0x8010001a,
+ 0x00000041, 0x00000000, 0x0010002a, 0x00000000, 0x0500002b, 0x00100022, 0x00000000, 0x0010001a,
+ 0x00000000, 0x07000038, 0x001000c2, 0x00000002, 0x00100ea6, 0x00000003, 0x00100556, 0x00000000,
+ 0x08000036, 0x001000d2, 0x00000004, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x09000037, 0x001020f2, 0x00000001, 0x00100006, 0x00000000, 0x00100e46, 0x00000004, 0x00100e46,
+ 0x00000002, 0x06000036, 0x00100032, 0x00000000, 0x00208046, 0x00000000, 0x00000002, 0x06000036,
+ 0x001000c2, 0x00000000, 0x00208406, 0x00000000, 0x00000003, 0x08000038, 0x001000f2, 0x00000000,
+ 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000001, 0x0a000038, 0x001000f2, 0x00000000,
+ 0x00100e46, 0x00000000, 0x00004002, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x05000036,
+ 0x00102032, 0x00000002, 0x00100086, 0x00000000, 0x05000036, 0x00102032, 0x00000003, 0x001005d6,
+ 0x00000000, 0x05000036, 0x00100042, 0x00000001, 0x00004001, 0x3f800000, 0x08000010, 0x00100012,
+ 0x00000000, 0x00208246, 0x00000000, 0x00000002, 0x00100246, 0x00000001, 0x08000010, 0x00100022,
+ 0x00000000, 0x00208246, 0x00000000, 0x00000003, 0x00100246, 0x00000001, 0x08000038, 0x00100022,
+ 0x00000001, 0x0010001a, 0x00000000, 0x0020803a, 0x00000000, 0x00000003, 0x08000038, 0x00100012,
+ 0x00000001, 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000002, 0x0a000000, 0x00102032,
+ 0x00000004, 0x00100046, 0x00000001, 0x00004002, 0xbf800000, 0x3f800000, 0x00000000, 0x00000000,
+ 0x08000036, 0x001020c2, 0x00000004, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x3f800000,
+ 0x0100003e,
};
static const DWORD vs_code_triangle[] =
{
#if 0
- float3x2 transform;
+ float3x2 transform_geometry;
+ float4 transform_rtx;
+ float4 transform_rty;
struct output
{
- float4 position : SV_POSITION;
+ float2 p : WORLD_POSITION;
float4 b : BEZIER;
nointerpolation float2x2 stroke_transform : STROKE_TRANSFORM;
+ float4 position : SV_POSITION;
};
void main(float2 position : POSITION, out struct output o)
{
+ o.p = mul(float3(position, 1.0f), transform_geometry);
o.b = float4(1.0, 0.0, 1.0, 1.0);
o.stroke_transform = float2x2(1.0, 0.0, 0.0, 1.0);
- o.position = float4(mul(float3(position, 1.0f), transform), 0.0f, 1.0f);
+ position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(o.p, 1.0f))
+ * float2(transform_rtx.w, transform_rty.w);
+ o.position = float4(position + float2(-1.0f, 1.0f), 0.0f, 1.0f);
}
#endif
- 0x43425844, 0x39fa8f9d, 0x25509057, 0xcfb2ce2a, 0x9d7fbadc, 0x00000001, 0x00000248, 0x00000003,
- 0x0000002c, 0x00000060, 0x000000f4, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x43425844, 0xda43bf17, 0x06e6d155, 0xdbce2ae5, 0x8aed6fd8, 0x00000001, 0x0000034c, 0x00000003,
+ 0x0000002c, 0x00000060, 0x0000011c, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x49534f50, 0x4e4f4954, 0xababab00,
- 0x4e47534f, 0x0000008c, 0x00000004, 0x00000008, 0x00000068, 0x00000000, 0x00000001, 0x00000003,
- 0x00000000, 0x0000000f, 0x00000074, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f,
- 0x0000007b, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x0000007b, 0x00000001,
- 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x505f5653, 0x5449534f, 0x004e4f49, 0x495a4542,
- 0x53005245, 0x4b4f5254, 0x52545f45, 0x46534e41, 0x004d524f, 0x52444853, 0x0000014c, 0x00010040,
- 0x00000053, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005f, 0x00101032, 0x00000000,
- 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, 0x03000065,
- 0x00102032, 0x00000002, 0x03000065, 0x00102032, 0x00000003, 0x02000068, 0x00000001, 0x08000036,
- 0x001020c2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x05000036,
- 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001,
- 0x3f800000, 0x08000010, 0x00102012, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000,
- 0x00000000, 0x08000010, 0x00102022, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000,
- 0x00000001, 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x3f800000, 0x00000000, 0x3f800000,
- 0x3f800000, 0x08000036, 0x00102032, 0x00000002, 0x00004002, 0x3f800000, 0x00000000, 0x00000000,
- 0x00000000, 0x08000036, 0x00102032, 0x00000003, 0x00004002, 0x00000000, 0x3f800000, 0x00000000,
- 0x00000000, 0x0100003e,
+ 0x4e47534f, 0x000000b4, 0x00000005, 0x00000008, 0x00000080, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x00000c03, 0x0000008f, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f,
+ 0x00000096, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x00000096, 0x00000001,
+ 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x000000a7, 0x00000000, 0x00000001, 0x00000003,
+ 0x00000004, 0x0000000f, 0x4c524f57, 0x4f505f44, 0x49544953, 0x42004e4f, 0x45495a45, 0x54530052,
+ 0x454b4f52, 0x4152545f, 0x4f46534e, 0x53004d52, 0x4f505f56, 0x49544953, 0xab004e4f, 0x52444853,
+ 0x00000228, 0x00010040, 0x0000008a, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, 0x0300005f,
+ 0x00101032, 0x00000000, 0x03000065, 0x00102032, 0x00000000, 0x03000065, 0x001020f2, 0x00000001,
+ 0x03000065, 0x00102032, 0x00000002, 0x03000065, 0x00102032, 0x00000003, 0x04000067, 0x001020f2,
+ 0x00000004, 0x00000001, 0x02000068, 0x00000002, 0x05000036, 0x00100032, 0x00000000, 0x00101046,
+ 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x08000010, 0x00100012,
+ 0x00000001, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000010, 0x00100022,
+ 0x00000001, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000001, 0x05000036, 0x00102032,
+ 0x00000000, 0x00100046, 0x00000001, 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x3f800000,
+ 0x00000000, 0x3f800000, 0x3f800000, 0x08000036, 0x00102032, 0x00000002, 0x00004002, 0x3f800000,
+ 0x00000000, 0x00000000, 0x00000000, 0x08000036, 0x00102032, 0x00000003, 0x00004002, 0x00000000,
+ 0x3f800000, 0x00000000, 0x00000000, 0x05000036, 0x00100042, 0x00000001, 0x00004001, 0x3f800000,
+ 0x08000010, 0x00100012, 0x00000000, 0x00208246, 0x00000000, 0x00000002, 0x00100246, 0x00000001,
+ 0x08000010, 0x00100022, 0x00000000, 0x00208246, 0x00000000, 0x00000003, 0x00100246, 0x00000001,
+ 0x08000038, 0x00100022, 0x00000001, 0x0010001a, 0x00000000, 0x0020803a, 0x00000000, 0x00000003,
+ 0x08000038, 0x00100012, 0x00000001, 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000002,
+ 0x0a000000, 0x00102032, 0x00000004, 0x00100046, 0x00000001, 0x00004002, 0xbf800000, 0x3f800000,
+ 0x00000000, 0x00000000, 0x08000036, 0x001020c2, 0x00000004, 0x00004002, 0x00000000, 0x00000000,
+ 0x00000000, 0x3f800000, 0x0100003e,
};
static const DWORD vs_code_bezier[] =
{
#if 0
- float3x2 transform;
+ float3x2 transform_geometry;
+ float4 transform_rtx;
+ float4 transform_rty;
struct output
{
- float4 position : SV_POSITION;
+ float2 p : WORLD_POSITION;
float4 b : BEZIER;
nointerpolation float2x2 stroke_transform : STROKE_TRANSFORM;
+ float4 position : SV_POSITION;
};
void main(float2 position : POSITION, float3 texcoord : TEXCOORD0, out struct output o)
{
+ o.p = mul(float3(position, 1.0f), transform_geometry);
o.b = float4(texcoord, 1.0);
o.stroke_transform = float2x2(1.0, 0.0, 0.0, 1.0);
- o.position = float4(mul(float3(position, 1.0f), transform), 0.0f, 1.0f);
+ position = mul(float2x3(transform_rtx.xyz, transform_rty.xyz), float3(o.p, 1.0f))
+ * float2(transform_rtx.w, transform_rty.w);
+ o.position = float4(position + float2(-1.0f, 1.0f), 0.0f, 1.0f);
}
#endif
- 0x43425844, 0xb3062c59, 0x502bebd6, 0xb6d3782a, 0x5377c79f, 0x00000001, 0x0000027c, 0x00000003,
- 0x0000002c, 0x00000080, 0x00000114, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038,
+ 0x43425844, 0xedb7472a, 0x2c2ea147, 0x36710079, 0xffc2e907, 0x00000001, 0x00000380, 0x00000003,
+ 0x0000002c, 0x00000080, 0x0000013c, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x00000041, 0x00000000, 0x00000000,
0x00000003, 0x00000001, 0x00000707, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044,
- 0x4e47534f, 0x0000008c, 0x00000004, 0x00000008, 0x00000068, 0x00000000, 0x00000001, 0x00000003,
- 0x00000000, 0x0000000f, 0x00000074, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f,
- 0x0000007b, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x0000007b, 0x00000001,
- 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x505f5653, 0x5449534f, 0x004e4f49, 0x495a4542,
- 0x53005245, 0x4b4f5254, 0x52545f45, 0x46534e41, 0x004d524f, 0x52444853, 0x00000160, 0x00010040,
- 0x00000058, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005f, 0x00101032, 0x00000000,
- 0x0300005f, 0x00101072, 0x00000001, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065,
- 0x001020f2, 0x00000001, 0x03000065, 0x00102032, 0x00000002, 0x03000065, 0x00102032, 0x00000003,
- 0x02000068, 0x00000001, 0x08000036, 0x001020c2, 0x00000000, 0x00004002, 0x00000000, 0x00000000,
- 0x00000000, 0x3f800000, 0x05000036, 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x05000036,
- 0x00100042, 0x00000000, 0x00004001, 0x3f800000, 0x08000010, 0x00102012, 0x00000000, 0x00100246,
- 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000010, 0x00102022, 0x00000000, 0x00100246,
- 0x00000000, 0x00208246, 0x00000000, 0x00000001, 0x05000036, 0x00102072, 0x00000001, 0x00101246,
- 0x00000001, 0x05000036, 0x00102082, 0x00000001, 0x00004001, 0x3f800000, 0x08000036, 0x00102032,
- 0x00000002, 0x00004002, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x08000036, 0x00102032,
- 0x00000003, 0x00004002, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x0100003e,
+ 0x4e47534f, 0x000000b4, 0x00000005, 0x00000008, 0x00000080, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x00000c03, 0x0000008f, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f,
+ 0x00000096, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000c03, 0x00000096, 0x00000001,
+ 0x00000000, 0x00000003, 0x00000003, 0x00000c03, 0x000000a7, 0x00000000, 0x00000001, 0x00000003,
+ 0x00000004, 0x0000000f, 0x4c524f57, 0x4f505f44, 0x49544953, 0x42004e4f, 0x45495a45, 0x54530052,
+ 0x454b4f52, 0x4152545f, 0x4f46534e, 0x53004d52, 0x4f505f56, 0x49544953, 0xab004e4f, 0x52444853,
+ 0x0000023c, 0x00010040, 0x0000008f, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, 0x0300005f,
+ 0x00101032, 0x00000000, 0x0300005f, 0x00101072, 0x00000001, 0x03000065, 0x00102032, 0x00000000,
+ 0x03000065, 0x001020f2, 0x00000001, 0x03000065, 0x00102032, 0x00000002, 0x03000065, 0x00102032,
+ 0x00000003, 0x04000067, 0x001020f2, 0x00000004, 0x00000001, 0x02000068, 0x00000002, 0x05000036,
+ 0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x05000036, 0x00100042, 0x00000000, 0x00004001,
+ 0x3f800000, 0x08000010, 0x00100012, 0x00000001, 0x00100246, 0x00000000, 0x00208246, 0x00000000,
+ 0x00000000, 0x08000010, 0x00100022, 0x00000001, 0x00100246, 0x00000000, 0x00208246, 0x00000000,
+ 0x00000001, 0x05000036, 0x00102032, 0x00000000, 0x00100046, 0x00000001, 0x05000036, 0x00102072,
+ 0x00000001, 0x00101246, 0x00000001, 0x05000036, 0x00102082, 0x00000001, 0x00004001, 0x3f800000,
+ 0x08000036, 0x00102032, 0x00000002, 0x00004002, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
+ 0x08000036, 0x00102032, 0x00000003, 0x00004002, 0x00000000, 0x3f800000, 0x00000000, 0x00000000,
+ 0x05000036, 0x00100042, 0x00000001, 0x00004001, 0x3f800000, 0x08000010, 0x00100012, 0x00000000,
+ 0x00208246, 0x00000000, 0x00000002, 0x00100246, 0x00000001, 0x08000010, 0x00100022, 0x00000000,
+ 0x00208246, 0x00000000, 0x00000003, 0x00100246, 0x00000001, 0x08000038, 0x00100022, 0x00000001,
+ 0x0010001a, 0x00000000, 0x0020803a, 0x00000000, 0x00000003, 0x08000038, 0x00100012, 0x00000001,
+ 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000002, 0x0a000000, 0x00102032, 0x00000004,
+ 0x00100046, 0x00000001, 0x00004002, 0xbf800000, 0x3f800000, 0x00000000, 0x00000000, 0x08000036,
+ 0x001020c2, 0x00000004, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x0100003e,
};
static const DWORD ps_code[] =
{
@@ -2526,7 +2580,7 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
struct input
{
- float4 p : SV_POSITION;
+ float2 p : WORLD_POSITION;
float4 b : BEZIER;
nointerpolation float2x2 stroke_transform : STROKE_TRANSFORM;
};
@@ -2563,9 +2617,9 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
{
float4 colour;
- colour = sample_brush(colour_brush, t0, s0, i.p.xy);
+ colour = sample_brush(colour_brush, t0, s0, i.p);
if (opacity_brush.type < BRUSH_TYPE_COUNT)
- colour *= sample_brush(opacity_brush, t1, s1, i.p.xy).a;
+ colour *= sample_brush(opacity_brush, t1, s1, i.p).a;
if (outline)
{
@@ -2599,17 +2653,17 @@ static HRESULT d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_t
return colour;
}
#endif
- 0x43425844, 0x94204054, 0xb32c16ca, 0xf1b1691a, 0x21e0e461, 0x00000001, 0x00000778, 0x00000003,
- 0x0000002c, 0x000000c0, 0x000000f4, 0x4e475349, 0x0000008c, 0x00000004, 0x00000008, 0x00000068,
- 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x00000074, 0x00000000, 0x00000000,
- 0x00000003, 0x00000001, 0x00000f0f, 0x0000007b, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
- 0x00000303, 0x0000007b, 0x00000001, 0x00000000, 0x00000003, 0x00000003, 0x00000303, 0x505f5653,
- 0x5449534f, 0x004e4f49, 0x495a4542, 0x53005245, 0x4b4f5254, 0x52545f45, 0x46534e41, 0x004d524f,
- 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
- 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000067c, 0x00000040,
- 0x0000019f, 0x04000059, 0x00208e46, 0x00000000, 0x00000007, 0x0300005a, 0x00106000, 0x00000000,
- 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858,
- 0x00107000, 0x00000001, 0x00005555, 0x04002064, 0x00101032, 0x00000000, 0x00000001, 0x03001062,
+ 0x43425844, 0x52e10ec7, 0xa7dbaa25, 0xb255a016, 0xf301e644, 0x00000001, 0x00000778, 0x00000003,
+ 0x0000002c, 0x000000c4, 0x000000f8, 0x4e475349, 0x00000090, 0x00000004, 0x00000008, 0x00000068,
+ 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000303, 0x00000077, 0x00000000, 0x00000000,
+ 0x00000003, 0x00000001, 0x00000f0f, 0x0000007e, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
+ 0x00000303, 0x0000007e, 0x00000001, 0x00000000, 0x00000003, 0x00000003, 0x00000303, 0x4c524f57,
+ 0x4f505f44, 0x49544953, 0x42004e4f, 0x45495a45, 0x54530052, 0x454b4f52, 0x4152545f, 0x4f46534e,
+ 0xab004d52, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000,
+ 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000678,
+ 0x00000040, 0x0000019e, 0x04000059, 0x00208e46, 0x00000000, 0x00000007, 0x0300005a, 0x00106000,
+ 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555,
+ 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000000, 0x03001062,
0x001010f2, 0x00000001, 0x03000862, 0x00101032, 0x00000002, 0x03000862, 0x00101032, 0x00000003,
0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x09000038, 0x001000f2, 0x00000000,
0x00208556, 0x00000000, 0x00000001, 0x00208e46, 0x00000000, 0x00000002, 0x0404001f, 0x0020800a,
--
2.1.4
More information about the wine-patches
mailing list