Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
109d48f3
Commit
109d48f3
authored
Feb 03, 2019
by
chili
Browse files
fixing matrix layout hlsl
parent
7add7049
Changes
2
Show whitespace changes
Inline
Side-by-side
hw3d/Graphics.cpp
View file @
109d48f3
...
...
@@ -127,7 +127,7 @@ void Graphics::DrawTestTriangle( float angle )
{
-
0.5
f
,
-
0.5
f
,
0
,
0
,
255
,
0
},
{
-
0.3
f
,
0.3
f
,
0
,
255
,
0
,
0
},
{
0.3
f
,
0.3
f
,
0
,
0
,
255
,
0
},
{
0.0
f
,
-
0.8
f
,
255
,
0
,
0
,
0
},
{
0.0
f
,
-
1.0
f
,
255
,
0
,
0
,
0
},
};
vertices
[
0
].
color
.
g
=
255
;
wrl
::
ComPtr
<
ID3D11Buffer
>
pVertexBuffer
;
...
...
@@ -183,8 +183,8 @@ void Graphics::DrawTestTriangle( float angle )
const
ConstantBuffer
cb
=
{
{
std
::
cos
(
angle
),
std
::
sin
(
angle
),
0.0
f
,
0.0
f
,
-
std
::
sin
(
angle
),
std
::
cos
(
angle
),
0.0
f
,
0.0
f
,
(
3.0
f
/
4.0
f
)
*
std
::
cos
(
angle
),
std
::
sin
(
angle
),
0.0
f
,
0.0
f
,
(
3.0
f
/
4.0
f
)
*
-
std
::
sin
(
angle
),
std
::
cos
(
angle
),
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
,
}
...
...
hw3d/VertexShader.hlsl
View file @
109d48f3
...
...
@@ -6,7 +6,7 @@ struct VSOut
cbuffer
CBuf
{
matrix
transform
;
row_major
matrix
transform
;
};
VSOut
main
(
float2
pos
:
Position
,
float3
color
:
Color
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment