| 1369 | } |
| 1370 | |
| 1371 | static void InitTexOpt(texture_option_t *texopt, const bool is_bump) { |
| 1372 | if (is_bump) { |
| 1373 | texopt->imfchan = 'l'; |
| 1374 | } else { |
| 1375 | texopt->imfchan = 'm'; |
| 1376 | } |
| 1377 | texopt->bump_multiplier = static_cast<real_t>(1.0); |
| 1378 | texopt->clamp = false; |
| 1379 | texopt->blendu = true; |
| 1380 | texopt->blendv = true; |
| 1381 | texopt->sharpness = static_cast<real_t>(1.0); |
| 1382 | texopt->brightness = static_cast<real_t>(0.0); |
| 1383 | texopt->contrast = static_cast<real_t>(1.0); |
| 1384 | texopt->origin_offset[0] = static_cast<real_t>(0.0); |
| 1385 | texopt->origin_offset[1] = static_cast<real_t>(0.0); |
| 1386 | texopt->origin_offset[2] = static_cast<real_t>(0.0); |
| 1387 | texopt->scale[0] = static_cast<real_t>(1.0); |
| 1388 | texopt->scale[1] = static_cast<real_t>(1.0); |
| 1389 | texopt->scale[2] = static_cast<real_t>(1.0); |
| 1390 | texopt->turbulence[0] = static_cast<real_t>(0.0); |
| 1391 | texopt->turbulence[1] = static_cast<real_t>(0.0); |
| 1392 | texopt->turbulence[2] = static_cast<real_t>(0.0); |
| 1393 | texopt->texture_resolution = -1; |
| 1394 | texopt->type = TEXTURE_TYPE_NONE; |
| 1395 | } |
| 1396 | |
| 1397 | static void InitMaterial(material_t *material) { |
| 1398 | InitTexOpt(&material->ambient_texopt, /* is_bump */ false); |