Closed montify closed 6 years ago
Hello Guys, i cant receive ConstantBuffer information, i do it like
CompilationResult vertexShaderByteCode = ShaderBytecode.CompileFromFile(path, "VSMain", "vs_5_0", ShaderFlags.Debug); ShaderReflection shaderReflection = new ShaderReflection(vertexShaderByteCode); Console.WriteLine(shaderReflection.Description.ConstantBuffers);
the VertexShader look like:
cbuffer cbPerObject { float4x4 WVP; }; struct VSInput { float3 Pos : POSITION; float4 Color : COLOR; }; struct VSOutput { float4 Pos : SV_Position; float4 Color: COLOR; }; VSOutput VSMain(VSInput In) { VSOutput Out; Out.Pos = float4(In.Pos.x, In.Pos.y, In.Pos.z, 1); Out.Color = In.Color; return Out; }
but the result of shaderReflection.Description.ConstantBuffers is 0...
shaderReflection.Description.ConstantBuffers
Argh, for everyone who have the same issue: Please note that is a Constant Buffer is not used, it will be stripped off the bytecode.
Hello Guys, i cant receive ConstantBuffer information, i do it like
the VertexShader look like:
but the result of
shaderReflection.Description.ConstantBuffers
is 0...