Skip to content

Commit

Permalink
Fixed tesselation shaders macros not being defined
Browse files Browse the repository at this point in the history
Thanks @ShokerStlk for spotting the bug.

m_ShaderOptions was/were forgotten in 31accf9
  • Loading branch information
Xottab-DUTY committed Jul 8, 2020
1 parent 6d7ec39 commit 3d62bd5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Layers/xrRenderPC_R4/r4_shaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ class shader_options_holder
D3D_SHADER_MACRO m_options[128];

public:
void add(const xr_vector<D3D_SHADER_MACRO>& macros)
{
for (auto macro : macros)
{
m_options[pos] = std::move(macro);
++pos;
}
}

void add(cpcstr name, cpcstr value)
{
m_options[pos] = { name, value };
Expand Down Expand Up @@ -222,6 +231,9 @@ HRESULT CRender::shader_compile(pcstr name, IReader* fs, pcstr pFunctionName,
sh_name.append(option);
};

// External defines
options.add(m_ShaderOptions);

// Shadow map size
{
xr_itoa(o.smapsize, c_smap, 10);
Expand Down

0 comments on commit 3d62bd5

Please sign in to comment.