16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 07:39:19 +02:00

revert, try to maintain compatiblity with weirdness for now...

This commit is contained in:
milek7
2022-03-07 21:02:14 +01:00
parent 063db3d382
commit d2b93f0cbb
3 changed files with 14 additions and 4 deletions

View File

@@ -209,18 +209,18 @@ material_data::assign( std::string const &Replacableskin ) {
// BUGS! it's not entierly designed whether opacity is property of material or submodel,
// and code does confusing things with this in various places
textures_alpha = (
GfxRenderer->Material( replacable_skins[ 1 ] ).get_or_guess_opacity() == 0.0f ?
GfxRenderer->Material( replacable_skins[ 1 ] ).is_translucent() ?
0x31310031 : // tekstura -1 z kanałem alfa - nie renderować w cyklu nieprzezroczystych
0x30300030 ); // wszystkie tekstury nieprzezroczyste - nie renderować w cyklu przezroczystych
if( GfxRenderer->Material( replacable_skins[ 2 ] ).get_or_guess_opacity() == 0.0f ) {
if( GfxRenderer->Material( replacable_skins[ 2 ] ).is_translucent() ) {
// tekstura -2 z kanałem alfa - nie renderować w cyklu nieprzezroczystych
textures_alpha |= 0x02020002;
}
if( GfxRenderer->Material( replacable_skins[ 3 ] ).get_or_guess_opacity() == 0.0f ) {
if( GfxRenderer->Material( replacable_skins[ 3 ] ).is_translucent() ) {
// tekstura -3 z kanałem alfa - nie renderować w cyklu nieprzezroczystych
textures_alpha |= 0x04040004;
}
if( GfxRenderer->Material( replacable_skins[ 4 ] ).get_or_guess_opacity() == 0.0f ) {
if( GfxRenderer->Material( replacable_skins[ 4 ] ).is_translucent() ) {
// tekstura -4 z kanałem alfa - nie renderować w cyklu nieprzezroczystych
textures_alpha |= 0x08080008;
}