Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 0243c8b7bca94179c78b9bd6ac76c033 > files > 81

cg-examples-3.0.0018-0.1.x86_64.rpm


sampler2D Decal = sampler_state
{
    AddressU = Mirror;
    AddressV = Mirror;
};

struct VOutput 
{
  float4 position : POSITION;
  float2 tex0 : TEXCOORD0;
};

VOutput vs( float3 position : POSITION, float2 tex0 : TEXCOORD0 )
{	
  VOutput OUT;

  OUT.position = float4( position, 1.0 );
  OUT.tex0 = tex0;

  return OUT;
}

struct POutput
{
  float4 color : COLOR;
};

POutput ps( VOutput input, uniform sampler2D decal : TEX0 )
{
  POutput OUT;
  OUT.color = tex2D( decal, input.tex0 );
  return OUT;
}

technique cgfx_texture
{
  pass
  {
      AlphaBlendEnable = false;
      CullMode = None;
      FillMode = Solid;
      
      VertexProgram = compile vs_4_0 vs();
      FragmentProgram = compile ps_4_0 ps( Decal );
  }
}