init
This commit is contained in:
commit
2fe6ca2f65
1473 changed files with 251771 additions and 0 deletions
28
gamedata/shaders/r1/model_distort.vs.hlsl
Normal file
28
gamedata/shaders/r1/model_distort.vs.hlsl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include "common.hlsli"
|
||||
#include "skin.hlsli"
|
||||
|
||||
struct vf
|
||||
{
|
||||
float4 hpos : POSITION;
|
||||
float2 tc0 : TEXCOORD0; // base
|
||||
float4 c0 : COLOR0; // color
|
||||
};
|
||||
|
||||
vf _main(v_model v)
|
||||
{
|
||||
vf o;
|
||||
|
||||
o.hpos = mul(m_WVP, v.pos); // xform, input in world coords
|
||||
o.tc0 = v.tc.xy; // copy tc
|
||||
|
||||
// calculate fade
|
||||
float3 dir_v = normalize(mul(m_WV, v.pos));
|
||||
float3 norm_v = normalize(mul(m_WV, v.norm));
|
||||
float fade = 1 - abs(dot(dir_v, norm_v));
|
||||
o.c0 = fade;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
#define SKIN_VF vf
|
||||
#include "skin_main.hlsli"
|
||||
Loading…
Add table
Add a link
Reference in a new issue