mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 14:17:59 +03:00
Fixed apparent buffer over-read in SDK_LightmappedGeneric
This commit is contained in:
parent
8b699441e9
commit
62c6c3cb6b
@ -1566,9 +1566,10 @@ void DrawLightmappedGeneric_DX9_Internal(CBaseVSShader *pShader, IMaterialVar**
|
|||||||
// Doing it here in the shader itself allows us to retain other properties, like FANCY_BLENDING.
|
// Doing it here in the shader itself allows us to retain other properties, like FANCY_BLENDING.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// m_SemiStaticCmdsOut wasn't being sent correctly, so we have to assign this to the API directly
|
// TODO: This is inefficient use of a constant; Something should be done about this in the future
|
||||||
float editorBlend = bEditorBlend ? 1.0f : 0.0f;
|
static const float editorBlend[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
pContextData->m_SemiStaticCmdsOut.SetPixelShaderConstant( 21, &editorBlend, 1 );
|
static const float regularBlend[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||||
|
pContextData->m_SemiStaticCmdsOut.SetPixelShaderConstant( 21, (bEditorBlend ? editorBlend : regularBlend), 1 );
|
||||||
/*
|
/*
|
||||||
if (bEditorBlend)
|
if (bEditorBlend)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user