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
6ed79cdb
Commit
6ed79cdb
authored
Apr 09, 2019
by
chili
Browse files
fix pixel shader
parent
f763531d
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw3d/PhongPS.hlsl
View file @
6ed79cdb
...
@@ -22,5 +22,5 @@ float4 main( float3 worldPos : Position,float3 n : Normal ) : SV_Target
...
@@ -22,5 +22,5 @@ float4 main( float3 worldPos : Position,float3 n : Normal ) : SV_Target
// diffuse intensity
// diffuse intensity
const
float3
diffuse
=
diffuseColor
*
diffuseIntensity
*
att
*
max
(
0
.
0
f
,
dot
(
dirToL
,
n
)
);
const
float3
diffuse
=
diffuseColor
*
diffuseIntensity
*
att
*
max
(
0
.
0
f
,
dot
(
dirToL
,
n
)
);
// final color
// final color
return
float4
(
saturate
(
diffuse
+
ambient
),
1
.
0
f
);
return
float4
(
saturate
(
(
diffuse
+
ambient
)
*
materialColor
),
1
.
0
f
);
}
}
\ No newline at end of file
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