Skip to content

Commit

Permalink
Correct unpacking color in debug shader on r3/r4
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLoaderr committed Oct 10, 2018
1 parent e0b77e6 commit ad03350
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions res/gamedata/shaders/r3/editor.vs
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;
}

0 comments on commit ad03350

Please sign in to comment.