| 190 | } |
| 191 | |
| 192 | Tr2SamplerDescription ReadSampler( EffectStream& stream ) |
| 193 | { |
| 194 | bool comparison = stream.Read<uint8_t>() != 0; |
| 195 | |
| 196 | auto minFilter = Tr2RenderContextEnum::TextureFilter( stream.Read<uint8_t>() ); |
| 197 | auto magFilter = Tr2RenderContextEnum::TextureFilter( stream.Read<uint8_t>() ); |
| 198 | auto mipFilter = Tr2RenderContextEnum::TextureFilter( stream.Read<uint8_t>() ); |
| 199 | |
| 200 | auto addressU = Tr2RenderContextEnum::TextureAddressMode( stream.Read<uint8_t>() ); |
| 201 | auto addressV = Tr2RenderContextEnum::TextureAddressMode( stream.Read<uint8_t>() ); |
| 202 | auto addressW = Tr2RenderContextEnum::TextureAddressMode( stream.Read<uint8_t>() ); |
| 203 | |
| 204 | float mipLODBias = stream.Read<float>(); |
| 205 | unsigned maxAnisotropy = stream.Read<uint8_t>(); |
| 206 | |
| 207 | auto comparisonFunc = Tr2RenderContextEnum::CompareFunc( stream.Read<uint8_t>() ); |
| 208 | |
| 209 | Color borderColor; |
| 210 | stream.Read( borderColor.r ); |
| 211 | stream.Read( borderColor.g ); |
| 212 | stream.Read( borderColor.b ); |
| 213 | stream.Read( borderColor.a ); |
| 214 | |
| 215 | float minLOD = stream.Read<float>(); |
| 216 | float maxLOD = stream.Read<float>(); |
| 217 | |
| 218 | return Tr2SamplerDescription( |
| 219 | minFilter, |
| 220 | magFilter, |
| 221 | mipFilter, |
| 222 | comparison, |
| 223 | addressU, |
| 224 | addressV, |
| 225 | addressW, |
| 226 | mipLODBias, |
| 227 | maxAnisotropy, |
| 228 | comparisonFunc, |
| 229 | &borderColor.r, |
| 230 | minLOD, |
| 231 | maxLOD ); |
| 232 | } |
| 233 | |
| 234 | void ReadPipelineInputs( std::vector<Tr2ShaderPipelineInputAL>& pipelineInputs, EffectStream& stream, unsigned version ) |
| 235 | { |
no test coverage detected