[2.2] Shader compile error with alpha test shadow caster

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
al2950
OGRE Expert User
OGRE Expert User
Posts: 1179
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 66

[2.2] Shader compile error with alpha test shadow caster

Post by al2950 » Mon Feb 11, 2019 10:59 pm

Hi

There is a bug in HLMS PBS which means the num_samplers property is not set, but num_textures is, if there is a alpha test texture on a shadow caster. This causes Dx shaders to fail to compile. The simple fix was to add the following to calculateHashForPreCaster

Code: Select all

            if( datablock->mSamplersDescSet )
                setProperty( PbsProperty::NumSamplers, datablock->mSamplersDescSet->mSamplers.size() );
I have created a PR here

Also if you could have a quick look at my other simple PR, it would be appreciated :D
0 x

Post Reply