
dialogs works ok, actions in dialogs added for starting missions, teleporting, panels, shops and etc

It combines the 2 textures depending on the steepness of the ground, so you can use it anywhere without worrying about colouring individual tiles, it will be done automatically.BlindSide wrote:
HLSL PS:HLSL VS:Code: Select all
sampler2D coverage; //coverage sampler2D lightmap; //lightmap sampler2D splat1; sampler2D splat2; // Pixel shader output structure struct PS_OUTPUT { float4 Color : COLOR0; // Pixel color }; struct PS_INPUT { float4 Position : POSITION; float4 Diffuse : COLOR0; float2 LightmapTexCoord : TEXCOORD1; //lightmap texture coords float2 SplatTexCoord1 : TEXCOORD2; //1st spalt texture coords float2 SplatTexCoord2 : TEXCOORD3; //2nd spalt texture coords float normalDist : TEXCOORD0; }; PS_OUTPUT main( PS_INPUT Input ) { PS_OUTPUT Output; float4 TexColor = lerp(tex2D( splat2, Input.SplatTexCoord2), tex2D( splat1, Input.SplatTexCoord1),Input.normalDist); float4 LightmapColor = tex2D( lightmap, Input.LightmapTexCoord ); // lightmap Output.Color = Input.Diffuse * TexColor * LightmapColor; return Output; }
Code: Select all
float4x4 mWorldViewProj; // World * View * Projection transformation // Vertex shader output structure struct VS_OUTPUT { float4 Position : POSITION; // vertex position float4 Diffuse : COLOR0; // vertex diffuse color float2 LightmapTexCoord : TEXCOORD1; //lightmap texture coords float2 SplatTexCoord1 : TEXCOORD2; //1st spalt texture coords float2 SplatTexCoord2 : TEXCOORD3; //2nd spalt texture coords float normalDist : TEXCOORD0; }; struct VS_INPUT { float4 Position : POSITION; float3 Normal : NORMAL; float4 Diffuse : COLOR0; float2 TexCoord0 : TEXCOORD0; float2 TexCoord1 : TEXCOORD1; }; VS_OUTPUT main(VS_INPUT Input) { VS_OUTPUT Output; // transform position to clip space Output.Position = mul(Input.Position, mWorldViewProj); Output.Diffuse = Input.Diffuse; Output.LightmapTexCoord = Input.TexCoord1; Output.SplatTexCoord1 = Input.TexCoord0; Output.SplatTexCoord2 = Input.TexCoord0; Output.normalDist = Input.Normal.y; return Output; }