Fix light color indexing bug

This commit is contained in:
Magnus Norddahl 2016-12-22 08:50:52 +01:00
parent 4f7c1dfdf5
commit 62724c2161
2 changed files with 2 additions and 2 deletions

View file

@ -245,7 +245,7 @@ SSAVec4i DrawSpanCodegen::Shade(SSAVec4i fg, bool isSimpleShade)
SSAVec4i lit_color = stack_lit_color.load();
block.loop_block(light_index < num_dynlights);
{
SSAVec4i light_color = SSAUBytePtr(dynlights[light_index][0].v).load_vec4ub(true);
SSAVec4i light_color = SSAUBytePtr(SSAValue(dynlights[light_index][0]).v).load_vec4ub(true);
SSAFloat light_x = dynlights[light_index][1].load(true);
SSAFloat light_y = dynlights[light_index][2].load(true);
//SSAFloat light_z = dynlights[light_index][3].load(true);

View file

@ -233,7 +233,7 @@ SSAVec4i DrawWallCodegen::Shade(SSAVec4i fg, int index, bool isSimpleShade)
SSAVec4i lit_color = stack_lit_color.load();
block.loop_block(light_index < num_dynlights);
{
SSAVec4i light_color = SSAUBytePtr(dynlights[light_index][0].v).load_vec4ub(true);
SSAVec4i light_color = SSAUBytePtr(SSAValue(dynlights[light_index][0]).v).load_vec4ub(true);
SSAFloat light_x = dynlights[light_index][1].load(true);
//SSAFloat light_y = dynlights[light_index][2].load(true);
SSAFloat light_z = dynlights[light_index][3].load(true);