Skip to content

Commit 1076dbb

Browse files
authored
Merge pull request #252 from SkyLoaderr/patch-5
Correct unpacking color in debug shader on r3/r4
2 parents e0b77e6 + ad03350 commit 1076dbb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

res/gamedata/shaders/r3/editor.vs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include "common.h"
2+
3+
struct vf
4+
{
5+
float4 C : COLOR0;
6+
float4 P : POSITION;
7+
};
8+
9+
struct v2p
10+
{
11+
float4 C : COLOR0;
12+
float4 P : SV_Position;
13+
};
14+
15+
uniform float4 tfactor;
16+
v2p main (vf i)
17+
{
18+
v2p o;
19+
20+
o.P = mul (m_WVP, i.P); // xform, input in world coords
21+
o.C = tfactor*unpack_D3DCOLOR(i.C);
22+
23+
return o;
24+
}

0 commit comments

Comments
 (0)