-
-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct unpacking color in debug shader on r3/r4
- Loading branch information
1 parent
e0b77e6
commit ad03350
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "common.h" | ||
|
||
struct vf | ||
{ | ||
float4 C : COLOR0; | ||
float4 P : POSITION; | ||
}; | ||
|
||
struct v2p | ||
{ | ||
float4 C : COLOR0; | ||
float4 P : SV_Position; | ||
}; | ||
|
||
uniform float4 tfactor; | ||
v2p main (vf i) | ||
{ | ||
v2p o; | ||
|
||
o.P = mul (m_WVP, i.P); // xform, input in world coords | ||
o.C = tfactor*unpack_D3DCOLOR(i.C); | ||
|
||
return o; | ||
} |