add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
24
gamedata/shaders/r2/base_lplanes.vs
Normal file
24
gamedata/shaders/r2/base_lplanes.vs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "common.h"
|
||||
|
||||
struct vf
|
||||
{
|
||||
float4 hpos : POSITION;
|
||||
float2 tc0 : TEXCOORD0; // base
|
||||
float4 c0 : COLOR0; // color
|
||||
};
|
||||
|
||||
vf main (v_static v)
|
||||
{
|
||||
vf o;
|
||||
|
||||
o.hpos = mul (m_WVP, v.P); // xform, input in world coords
|
||||
o.tc0 = unpack_tc_base (v.tc,v.T.w,v.B.w); // copy tc
|
||||
|
||||
// calculate fade
|
||||
float3 dir_v = normalize (mul(m_WV,v.P));
|
||||
float3 norm_v = normalize (mul(m_WV,unpack_normal(v.Nh)));
|
||||
float fade = abs (dot(dir_v,norm_v));
|
||||
o.c0 = fade;
|
||||
|
||||
return o;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue