-------------------------------------------------------------------------------- Description: Fill in the needed PPT data into the perobject data --------------------------------------------------------------------------------
| 64 | // Fill in the needed PPT data into the perobject data |
| 65 | // -------------------------------------------------------------------------------- |
| 66 | void EveCustomMask::FillPerObjectData( size_t n, EveSpaceObjectVSData* vsData, EveSpaceObjectPSData* psData ) const |
| 67 | { |
| 68 | // projection matrix goes into VS data |
| 69 | Matrix customMaskTransform, invCustomMaskTransform; |
| 70 | customMaskTransform = TransformationMatrix( m_scaling, m_rotation, m_position ); |
| 71 | invCustomMaskTransform = Inverse( customMaskTransform ); |
| 72 | vsData->customMaskMatrix[n] = Transpose( invCustomMaskTransform ); |
| 73 | // additional data |
| 74 | vsData->customMaskData[n] = Vector4( 1.f, m_isMirrored ? 1.f : 0.f, 0.f, 0.f ); |
| 75 | // material source IDs go into PS data |
| 76 | psData->customMaskMaterialIDs[n] = Vector4( (float)m_materialIndex, 0.f, 0.f, 0.f ); |
| 77 | // pattern targets go into PS data |
| 78 | psData->customMaskTargets[n] = m_targetMaterials; |
| 79 | |
| 80 | psData->customMaskClamps[int32_t( n * 2 )] = m_clampU ? 1.f : 0.f; |
| 81 | psData->customMaskClamps[int32_t( n * 2 + 1 )] = m_clampV ? 1.f : 0.f; |
| 82 | } |
| 83 | |
| 84 | // -------------------------------------------------------------------------------- |
| 85 | // Description: |
no test coverage detected