Posted By: 20BN
about UV move only skin1 or skin2..... skinX etc. - 07/29/18 14:08
Hi all.
Is passable skin 2 UV moving, but skin 1 don't move?
Is passable skin 2 UV moving, but skin 1 don't move?
const float4x4 matWorldViewProj; const float4x4 matWorld; const float fAmbient; const float4 vecSunDir; const float4 vecSkill41; texture entSkin1; sampler ColorMapSampler = sampler_state { Texture = <entSkin1>; AddressU = Clamp; AddressV = Clamp; }; void DiffuseVS( in float4 InPos: POSITION, in float3 InNormal: NORMAL, in float2 InTex: TEXCOORD0, out float4 OutPos: POSITION, out float2 OutTex: TEXCOORD0, out float3 OutNormal: TEXCOORD1) { OutPos = mul(InPos, matWorldViewProj); OutNormal = mul(InNormal, matWorld); OutTex = InTex+vecSkill41.xy; } float4 DiffusePS( in float2 InTex: TEXCOORD0, in float3 InNormal: TEXCOORD1): COLOR { InNormal = normalize(InNormal); float Diffuse = saturate(dot(-vecSunDir, InNormal))*0.5+0.5; float4 Color = tex2D(ColorMapSampler, InTex); float4 final = Color*Diffuse; return (1+fAmbient) * final; } technique DiffuseTechnique { pass P0 { VertexShader = compile vs_2_0 DiffuseVS(); PixelShader = compile ps_2_0 DiffusePS(); } }