Tried finding a possible solution for this for a while but couldnt get any,
Whenever I use ped_alpha the glass of the gasmask work (both the hair and the glass have the same texture image) but the shadow doesnt work for the hair
So I switched to ped_hair_cutout_alpha and the glass disappears, the shadow works though, along with the rest of the textures in the hair.
Couldnt find a solution for this so Im asking Oleg and other experts on the matter for help here.
Ped Shadow and texture problem
Re: Ped Shadow and texture problem
the "cutout" version of shader cuts pixels (makes them invisible) below some alpha value. quite good for sharp alpha cut on foliage for example. The ped_alpha uses alpha channel to make pixels semitransparent. I don't know how game generates shadow data but quite likely it has it's own decision making code whether semitransparent pixel drops shadow or not.
I advise to make hair and mask as two different components, so you can use different shaders. Also, if I'm not mistaken, one ped component can use different shaders, while it is constrained to one texture file. So, what about using different materials (and different shaders) for the mask and for the hair?
I advise to make hair and mask as two different components, so you can use different shaders. Also, if I'm not mistaken, one ped component can use different shaders, while it is constrained to one texture file. So, what about using different materials (and different shaders) for the mask and for the hair?
Re: Ped Shadow and texture problem
Didnt think about that when I was making it but it works now, Thanks Oleg. But as for using the same texture file in a .ytd file for 2 different components I know nothing about that.Oleg wrote: ↑Fri Dec 10, 2021 10:48 am the "cutout" version of shader cuts pixels (makes them invisible) below some alpha value. quite good for sharp alpha cut on foliage for example. The ped_alpha uses alpha channel to make pixels semitransparent. I don't know how game generates shadow data but quite likely it has it's own decision making code whether semitransparent pixel drops shadow or not.
I advise to make hair and mask as two different components, so you can use different shaders. Also, if I'm not mistaken, one ped component can use different shaders, while it is constrained to one texture file. So, what about using different materials (and different shaders) for the mask and for the hair?