[2.2] Shader compile error with alpha test shadow caster

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
OGRE Expert User
OGRE Expert User
Posts: 1214
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 80

[2.2] Shader compile error with alpha test shadow caster

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


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