mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 22:03:36 -07:00
Fixed directx grayscale implementation
This commit is contained in:
parent
86ef961051
commit
d95cdbf8be
1 changed files with 6 additions and 3 deletions
|
@ -88,13 +88,13 @@ struct ShaderProgramD3D11 {
|
|||
static struct {
|
||||
HMODULE d3d11_module;
|
||||
PFN_D3D11_CREATE_DEVICE D3D11CreateDevice;
|
||||
|
||||
|
||||
HMODULE d3dcompiler_module;
|
||||
pD3DCompile D3DCompile;
|
||||
|
||||
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
uint32_t msaa_num_quality_levels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT];
|
||||
|
||||
|
||||
ComPtr<ID3D11Device> device;
|
||||
ComPtr<IDXGISwapChain1> swap_chain;
|
||||
ComPtr<ID3D11DeviceContext> context;
|
||||
|
@ -448,6 +448,9 @@ static struct ShaderProgram *gfx_d3d11_create_and_load_new_shader(uint64_t shade
|
|||
if (cc_features.opt_fog) {
|
||||
ied[ied_index++] = { "FOG", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 };
|
||||
}
|
||||
if (cc_features.opt_grayscale) {
|
||||
ied[ied_index++] = { "GRAYSCALE", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 };
|
||||
}
|
||||
for (unsigned int i = 0; i < cc_features.num_inputs; i++) {
|
||||
DXGI_FORMAT format = cc_features.opt_alpha ? DXGI_FORMAT_R32G32B32A32_FLOAT : DXGI_FORMAT_R32G32B32_FLOAT;
|
||||
ied[ied_index++] = { "INPUT", i, format, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue