summaryrefslogtreecommitdiffstats
path: root/o3d/compiler/technique/test_data/sampler_test.fx
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/compiler/technique/test_data/sampler_test.fx')
-rw-r--r--o3d/compiler/technique/test_data/sampler_test.fx54
1 files changed, 54 insertions, 0 deletions
diff --git a/o3d/compiler/technique/test_data/sampler_test.fx b/o3d/compiler/technique/test_data/sampler_test.fx
new file mode 100644
index 0000000..12bcc61
--- /dev/null
+++ b/o3d/compiler/technique/test_data/sampler_test.fx
@@ -0,0 +1,54 @@
+// texture
+texture Tex0 : DiffuseMap <
+ string name = "tiger.bmp";
+ string UIName = "Base Texture";
+ >;
+
+// transformations
+float4x4 worldViewProj : WORLDVIEWPROJECTION;
+
+struct VS_OUTPUT
+{
+ float4 position : POSITION;
+ float2 texcoord : TEXCOORD0;
+};
+
+VS_OUTPUT VS(VS_OUTPUT IN) {
+ VS_OUTPUT Out = (VS_OUTPUT)0;
+ Out.position = mul(IN.position, worldViewProj);
+ Out.texcoord = IN.texcoord;
+ return Out;
+}
+
+sampler Sampler = sampler_state
+{
+ Texture = (Tex0);
+ MinFilter = Linear;
+ MagFilter = Point;
+ MipFilter = None;
+ AddressU = Mirror;
+ AddressV = Wrap;
+ AddressW = Clamp;
+ MaxAnisotropy = 16;
+ BorderColor = float4(1.0, 0.0, 0.0, 1.0);
+};
+
+
+float4 PS(VS_OUTPUT IN) : COLOR
+{
+ float4 color = tex2D(Sampler, IN.texcoord);
+ return color ;
+}
+
+
+technique DefaultTechnique
+{
+ pass P0
+ {
+ // shaders
+ CullMode = None;
+ VertexShader = compile vs_2_0 VS();
+ PixelShader = compile ps_2_0 PS();
+ }
+}
+