I am making a true start in shader programming and I am using the monogam framework.
packtpub 3D graphics xna game studio 4.0
I'm trying to follow with examples in this book but I have a wall past Trying to create 4-day rendering functions (if you know some of this book, chapter 3) prelighting the code
- The code is compiled properly, but applied to any netting with prelighting shaders 2 Fails to display. When VS2013 drilling down shader locals, I
VertexShader 'this.depthNormalEffect._shaders [0] threw an exception .VertexShader' type 'system exception seems like this .Runtime.InteropServices.SEHException 'SharpDX.Direct3D11.VertexShader {System.Runtime.InteropServices.SEHException}
Which: ID3D11Device with DX native debugger tranlates for D3D11 error :: CreateVertexShader: Shader should be vs_4_0, vs_4_1, or vs_5_0. Provided Soder version: ps_4_0 [STATE_CREATION ERROR # 167: CREATEVERTEXSHADER_INVALIDSHADERTYPE] 3d 11: BREAK is able to last message was: [error STATE_CREATION # 167: CREATEVERTEXSHADER_INVALIDSHADERTYPE] first on 0x75FAC41F Chance Exception (KernelBase.dll) in 3dTest.exe: 0x0000087A (Parameter: 0x00000001, 0x003DB5D0, 0x003DC328). D3D11 Error: ID 3D Device 11: BuildPixelSheather: SHडर should be ps_4_0, ps_4_1, or ps_5_0. Provided shader version: vs_4_0 [STATE_CREATION Error # 193: CREATEPIXELSHADER_INVALIDSHADERTYPE] D3D11: BREAK to enable this message, which was: [error STATE_CREATION # 193: CREATEPIXELSHADER_INVALIDSHADERTYPE]
stunning thing (for me) that the library should be to find the link to the wrong compiled shader function vertex or pixel shaders and
D3D11 error: ID3D11Device :: CreatePixelShader: shader ps_4_0, ps_4_1 , Or ps_5_0. Provided shader version: vs_4_0 [STATE_CREATION Error # 193: CREATEPIXELSHADER_INVALIDSHADERTYPE]
It spans three shaders with some shader code (Effect 2 then rendering to render the third goal Can use it for the last pass)
float4x4 world; Float4x4 view; Float4x4 projection; Structure Vertex ShaderInpop {float4 Status: SV_ POSITION; Float 3 general: normal 3; }; Structure vertex cursor output {float4 position: SV_POSITION; Float2 Depth: TEXCOORD0; Float 3 general: text code 1; }; VertexShaderOutput VertexShaderFunction (VertexShaderInput Input) {VertexShader Output Output; Float4x4 see projection = original (see, projection); Float4x4 worldViewProjection = mul (world, see projection); Output.position = Maule (Input. Position, WorldVioProject); Output. Normal = basic (input general, world); // position composer and status correspondent a la distance% camera and% plan lointain output.Depth.xy = output.Position.zw; Return output; } Struct pixelsheader output {float4 normal: COLOR0; Float 4 Depth: Color 1; }; Pixelshaderoptput pixelshaderfunction (vertexshaderoptput input) {pixelsshader output output; Output.Depth = input.Depth.x / input.Depth.y; Output.Normal.xyz = (normal (input.) .xyz / 2) +5 Output.Depth.a = 1; Output.Normal.a = 1; Return output; } Technique Technique 0 {Pass Pass {VertexShader} = Compiler vs_4_0 VertixShader Function (); Pixelsshader = compilation ps_4_0 pixelshaderfunction (); }};
Well, the searches made on Google have left me dry on this issue which makes me think I'm completely fooling it, to make it real (shader n00b: D) Remember.
Any ideas ??
No comments:
Post a Comment