#include "common.sh"


struct VsInput
{
  float2 xz        : POSITION0;
  float  y         : POSITION1;
};

struct VsOutput
{
  float4 pos       : POSITION;
  float3 eyeVec    : TEXCOORD0;
};


VsOutput vsh(VsInput I)
{
  VsOutput O;

  float4 pos=float4(I.xz.x, I.y, I.xz.y, 1);

  O.pos=mul(globtm, pos);

  O.eyeVec.xyz=pos.xyz-view_pos.xyz;

  return O;
}



float4 psh(VsOutput I) : COLOR
{
  float3 fogColor=calc_sky_color(normalize(I.eyeVec.xyz))*planet_k;

  return pack_color(fogColor, 0);
}
