Original Post
Hey gamedevelopers. I have a little problem. I want to get started with shaders/effects but i still do not have a working example which allows me to expiriment with effect files. For some reason, the BasicHLSL sample from the SDK doesn't work. So i tried to turn the Meshes tutorial (with the nice tiger) into a shader testing app. But the first thing that didn't work was: D3DXCreateEffectFromFile. It returns E_FAIL wich is a very strange return value for a DX routine. I don't see anything suspicious in the debug-runtime logfile. maybe i can use PIX to determine what the hell is going on, but i don't know how to debug the D3D initialization by using PIX. The PIX tut's only explain stuff like taking screenshots and recording D3D call sequences in a specific frame. I used different effect files. e.g this one: ------------------------------------------------------------------ //===================================== // My first Effect file //===================================== //Variabeles float4x4 g_mWorldViewProjection; texture g_MeshTexture; //structures struct VS_OUTPUT { float4 Position : POSITION; float2 TextureCoords: TEXCOORD1; }; struct PS_OUTPUT { float4 Color : COLOR0; }; //-------------------------------------------------------------------------------------- // Texture samplers //-------------------------------------------------------------------------------------- sampler MeshTextureSampler = sampler_state { Texture = ; MipFilter = LINEAR; MinFilter = LINEAR; MagFilter = LINEAR; }; VS_OUTPUT VS_function( float4 vPos : POSITION, float2 vTexCoord0 : TEXCOORD0 ) { VS_OUTPUT Output; Output.Position = mul( vPos, g_mWorldViewProjection ); Output.TextureCoords = vTexCoord0; return Output; } PS_OUTPUT PS_function(VS_OUTPUT input) { PS_OUTPUT output; output.Color = tex2D(MeshTextureSampler, input.TextureCoords); return output; } //my first technique Technique MyTechnique { Pass FirstPass { VertexShader = compile vs_1_1 VS_function(); PixelShader = compile ps_1_1 PS_function(); } } ----------------------------------------------------------------------- This effect file should compile in FX composer but somehow D3DXCreateEffectFromFile keeps failing. Can someone help me with this. plz.? Thanx in advance [Edited by - chronozphere on August 5, 2007 3:56:36 PM]