Hi,
I realy dont get it. This is the standart DX9 way of doing reflections… Never looked inside, but now…
Why is there
VertexShader = null;
PixelShader = null;
And, like always… Is it possible in DX11 in this easy way?
//@author: vvvv group
//@help: draws a mesh with environment cube map. like a reflection
//@tags: reflection, metal, mirror
//@credits:
// -----------------------------------------------------------------------------
// PARAMETERS:
// -----------------------------------------------------------------------------
//transforms
float4x4 tW: WORLD; //the models world matrix
float4x4 tV: VIEW; //view matrix as set via Renderer (DX9)
float4x4 tP: PROJECTION; //projection matrix as set via Renderer (DX9)
float4x4 tWVP: WORLDVIEWPROJECTION;
texture texCubeMap <string uiname=“Texture”;>;
sampler Samp = sampler_state //sampler for doing the texture-lookup
{
Texture = (texCubeMap); //apply a texture to the sampler
Filter = MIN_MAG_MIP_LINEAR;
};
float4x4 tTex : CUBETEXTUREMATRIX <string uiname=“Texture Transform”;>;
-I PUT AWAY THE OTHERE TECHNIQUE-
technique TChromeFF
{
pass P0
{
WorldTransform0 = ;
ViewTransform = ;
ProjectionTransform = ;
// Pixel state
Texture[0](0) = <texCubeMap>;
MinFilter[0](0) = Linear;
MagFilter[0](0) = Linear;
AddressU[0](0) = Clamp;
AddressV[0](0) = Clamp;
AddressW[0](0) = Clamp;
ColorOp[0](0) = SelectArg1;
ColorArg1[0](0) = Texture;
TextureTransform[0](0) = (tTex);
TexCoordIndex[0](0) = CameraSpaceReflectionVector;
TextureTransformFlags[0](0) = Count3;
//shader
VertexShader = null;
PixelShader = null;
}
}