06-15-2017, 04:34 PM
Is there a way to use techniques and passes identified in an FX file? Currently I am using 3 separate shaders as follows:
dxDevice.EffectsManager.GetShaders(
"MeshNormalColorShader.vs", "MeshNormalColorShader.gs", "MeshNormalColorShader.ps", vertexLayoutDesc,
out _vertexShaderSharedResource, out _geometryShaderSharedResource, out _pixelShaderSharedResource, out _inputLayoutSharedResource,
throwExceptionIfShadersNotFound: true);
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
However, it would be nice to have something like this:
dxDevice.EffectsManager.GetTechnique("MeshNormalTechnique", "file_name.fx", techniqueSharedResource);
Where the technique could contain multiple passes that constant buffer changes and/or blend & stencil setting changes.
dxDevice.EffectsManager.GetShaders(
"MeshNormalColorShader.vs", "MeshNormalColorShader.gs", "MeshNormalColorShader.ps", vertexLayoutDesc,
out _vertexShaderSharedResource, out _geometryShaderSharedResource, out _pixelShaderSharedResource, out _inputLayoutSharedResource,
throwExceptionIfShadersNotFound: true);
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
However, it would be nice to have something like this:
dxDevice.EffectsManager.GetTechnique("MeshNormalTechnique", "file_name.fx", techniqueSharedResource);
Where the technique could contain multiple passes that constant buffer changes and/or blend & stencil setting changes.

