PrismaticFlower / shaderpatch

Improved shaders (and fun stuff for modders) for Star Wars Battlefront II (2005) - Incompatible with Classic Collection
MIT License
39 stars 2 forks source link

Foliage particles with normal_ext materials are sometimes drawn incorrectly #75

Closed DoctorAnsem closed 5 years ago

DoctorAnsem commented 5 years ago

There are two possible bugs I'm seeing regarding this, but it's a bit dumb to explain because these happen on some maps but not others.

  1. Grass patches don't fade in and out smoothly, instead they rapidly pop as the camera moves. I don't understand why this happens on only some maps. The only real difference I saw that on the bugged maps, there were more than one defined grass layers in the prop file. Material parameters are pretty much the same.

  2. Since things weren't confusing enough, there's also seemingly a diffuse color or lighting problem. It feels as though they're universally drawn just a bit too dark, but I suppose that could be a conflict with the ODF's "Darkness" values just as well. That's not the main point though. There's something odd happening, as I have some grass patches of a certain foliage material that are drawn very, very dark, but the very same ODF also contains "Flats" that in turn have their correct color as if nothing was wrong. We're talking inconsistency across the same material here. There's only one connecting factor here I can think of and that's a big if; it seems like the .dynamic materials that have an alpha channel in the normal map are drawn too dark, but the ones that have no alpha are correct. This of course is just speculation and it only holds merit in the case the $null_normalmap integrated texture has an alpha channel (I couldn't check this). Otherwise I've wasted much time trying to word all this so that it makes a speck of sense.

PrismaticFlower commented 5 years ago

I wonder if 1. is the same problem as #70 , seems like custom materials aren't responding when the game switches from an opaque shader to a transparent one.

For (once) I think I'm already aware of 2. and have an issue open for it #68 I plan to provide a way to solve it in v1.1, until then disabling custom materials on foliage is probably the best workaround. Although I'm not sure what would be going on with the alpha channel so maybe it isn't related, but it sounds like it is.

PrismaticFlower commented 5 years ago

Resolved in latest release, see DynamicNormalSign.