Implementing DPH/DPHI vertex shader opcodes
This commit is contained in:
parent
f1ff0fbf07
commit
d387839269
1 changed files with 15 additions and 0 deletions
|
@ -230,6 +230,21 @@ static void ProcessShaderCode(VertexShaderState& state) {
|
||||||
break;
|
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
|
// Reciprocal
|
||||||
case OpCode::Id::RCP:
|
case OpCode::Id::RCP:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue