void exportTo(fr::stream &f, const frGraphExporter &exp) { const sBool furtherParams=!aboutEqual(params[6].tfloatv.a, 0.0f) || !aboutEqual(params[6].tfloatv.b, 0.0) || !aboutEqual(params[7].tfloatv.a, 1.0f) || !aboutEqual(params[7].tfloatv.b, 1.0f) || params[8].selectv.sel != 3 || params[9].selectv.sel != 0 || params[12].floatv != 1.0f; f.putsU8((furtherParams ? 1 : 0) | (params[1].selectv.sel << 1) | (params[8].selectv.sel << 2) | (params[9].selectv.sel << 4)); putPackedVector(f, params[2].trfloatv, sFALSE); putPackedVector(f, params[3].trfloatv, sFALSE); f.putsU8(params[4].colorv.b); f.putsU8(params[4].colorv.g); f.putsU8(params[4].colorv.r); putPackedFloat(f, params[5].floatv); if (furtherParams) { putPackedFloat(f, params[6].tfloatv.a); putPackedFloat(f, params[6].tfloatv.b); putPackedFloat(f, params[7].tfloatv.a); putPackedFloat(f, params[7].tfloatv.b); if (params[9].selectv.sel) { putPackedFloat(f, params[10].floatv); putPackedFloat(f, params[11].floatv); } putPackedFloat(f, params[12].floatv); } }
void exportTo(fr::stream &f, const frGraphExporter &exp) { f.putsU8(params[2].selectv.sel); f.putsU16(params[1].floatv*256); f.putsU8(params[3].selectv.sel); f.putsU16((params[0].tfloatv.a-1)*512); f.putsU16((params[0].tfloatv.b-1)*512); // 8 bytes data+1 byte id+1 byte src+1 byte dest=11 bytes }
void exportStage(sInt stage, fr::stream& f) { f.putsU8((mtrl->uAddressMode[stage] << 0) | (mtrl->vAddressMode[stage] << 2) | (mtrl->filterMode[stage] << 4) | (mtrl->coordMode[stage] << 6)); }