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/Dynamic Geometry possibly bugged #67

Closed DoctorAnsem closed 5 years ago

DoctorAnsem commented 5 years ago

Now as a disclaimer, I might have not understood exactly how foliage material mapping should work and how dynamic geometry rendertypes play into this, but at the moment there's something I have no idea how to resolve.

dynamicalphablend

This is number 1. The alpha blending of the diffuse texture glitches out a lot, especially when the camera is moving. It does kind of blend correctly sometimes, but more often than not it's just black squares as a non-transparent square particle would be.

The foliage odf has the following properties:

[Properties]        

MinSize = "1.1"
MaxSize = "1.3"
Alpha = "1.0"
NumParticles = "55"
MaxDistance = "60"
Texture = "kas_grass"
RadiusFadeMin = "3.5"
RadiusFadeMax = "4.5"

DarknessMin = "0.4"
DarknessMax = "0.7"

The render type I'm using is normal_ext.dynamic and it has the Transparent flag set to true. Hardedged made no difference. Furthermore as I've understood a transparent diffuse map should have Premultiplied Alpha on, and the compression format is set to contain alpha too so I don't think the texture is flawed? Normal map is correctly set too.

Also issue number 2: Not only does the alpha blending flicker violently, the foliage particles themselves seem to flicker in and out of existence sometimes. This didn't start happening until I set them up with the custom material.

PrismaticFlower commented 5 years ago

That does look annoying. I'll likely look into and fix this at the same time as #66. They'll be my main focus for the next bug fix release.

DoctorAnsem commented 5 years ago

Hmh, something odd I just discovered is that this foliage is also very volatile in interfering with a PBR material's transparency... it is also hard-edged which is even more curious because I never saw that happen before. It actually looks like the foliage texture is trying to imprint itself on a material it was never meant to.

2019-06-02 18_03_32

Do you think this might be related, or a different problem altogether?