Implementing DPH/DPHI vertex shader opcodes

This commit is contained in:
mailwl 2015-06-17 19:29:39 +03:00
parent f1ff0fbf07
commit d387839269

View file

@ -230,6 +230,21 @@ static void ProcessShaderCode(VertexShaderState& state) {
break;
}
case OpCode::Id::DPH:
case OpCode::Id::DPHI:
{
float24 dot = src2[3];
for (int i = 0; i < 3; ++i)
dot += src1[i] * src2[i];
for (int i = 0; i < 4; ++i) {
if (!swizzle.DestComponentEnabled(i))
continue;
dest[i] = dot;
}
break;
}
// Reciprocal
case OpCode::Id::RCP:
{