А problem with the combination "T:AlbedoTexture + O:Weather.AmbientPrecipState". Once you remove the PBR material from the material properties and switch to diffuse texture control (T:DiffuseTexture), all problems evaporate.
But if O: Weather.AmbientPrecipState is replaced with A: AMBIENT PRECIP STATE, the texture starts showing. Of course, now it is always shown, but at least this allows you to make sure that the problem is not in the numbering of Z-layers.
Again. This code woks:
Code: Select all
!lua
local raining = 0x00000004
local snowing = 0x00000008
local StringNew
local precipState = varget("O:Weather.AmbientPrecipState", "Mask")
precipState = math.floor(precipState)
if precipState == raining then
StringNew="WetEffect_ON.dds"
elseif precipState == snowing then
StringNew="WetEffect_ON.dds"
else
StringNew="WetEffect_OFF.dds"
end
varset("T:DiffuseTexture","String",StringNew)
Code: Select all
varset("T:AlbedoTexture","String",StringNew)
And yes, the problem is clearly not with the material, since without scripts it is shown exactly as it should.
I am reliably aware that at least one of the major port developers has repeatedly informed you about a problem with this particular combination, but so far nothing has been done. They had to use SODE. Well, be men, or write "use SODE, we are impotents" or finally fix this damn bug with PBR materials. Thank you.