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
86aac23a
Commit
86aac23a
authored
Aug 27, 2019
by
chili
Browse files
Revert "test plane brings sampled normals into view space"
This reverts commit
27a08d83
.
parent
eebc975a
Changes
2
Hide whitespace changes
Inline
Side-by-side
hw3d/PhongPSNormalMap.hlsl
View file @
86aac23a
...
...
@@ -17,12 +17,6 @@ cbuffer ObjectCBuf
float
padding
[
1
];
};
cbuffer
TransformCBuf
{
matrix
modelView
;
matrix
modelViewProj
;
};
Texture2D
tex
;
Texture2D
nmap
;
...
...
@@ -38,7 +32,6 @@ float4 main(float3 worldPos : Position, float3 n : Normal, float2 tc : Texcoord)
n
.
x
=
normalSample
.
x
*
2
.
0
f
-
1
.
0
f
;
n
.
y
=
-
normalSample
.
y
*
2
.
0
f
+
1
.
0
f
;
n
.
z
=
-
normalSample
.
z
;
n
=
mul
(
n
,
(
float3x3
)
modelView
);
}
// fragment to light vector data
const
float3
vToL
=
lightPos
-
worldPos
;
...
...
hw3d/TestPlane.cpp
View file @
86aac23a
#include "TestPlane.h"
#include "Plane.h"
#include "BindableCommon.h"
#include "TransformCbufDoubleboi.h"
#include "imgui/imgui.h"
TestPlane
::
TestPlane
(
Graphics
&
gfx
,
float
size
)
...
...
@@ -30,7 +29,7 @@ TestPlane::TestPlane( Graphics& gfx,float size )
AddBind
(
Topology
::
Resolve
(
gfx
,
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST
)
);
AddBind
(
std
::
make_shared
<
TransformCbuf
Doubleboi
>
(
gfx
,
*
this
,
0u
,
2u
)
);
AddBind
(
std
::
make_shared
<
TransformCbuf
>
(
gfx
,
*
this
)
);
}
void
TestPlane
::
SetPos
(
DirectX
::
XMFLOAT3
pos
)
noexcept
...
...
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