OGRECave / ogre-next

aka ogre v2 - scene-oriented, flexible 3D C++ engine
https://ogrecave.github.io/ogre-next/api/latest
Other
980 stars 222 forks source link

Add Alpha Tested Shadows sample #162

Open darksylinc opened 3 years ago

darksylinc commented 3 years ago

Not only this is requested by some users, there are multiple edge cases we must ensure don't break:

  1. Simple diffuse map alpha tested
  2. Diffuse map alpha tested, but sampler state is not N°0, thus we must use multiple samplers with different addressing modes (i.e. use wrap for diffuse, clamp for normal maps?). 'well, in d3d11 the trick to provoke it is to have the sampler block that should be used for caster pass with an id greater to at least one of the other sampler blocks of the material'
  3. Detail maps are used
  4. Detail normal maps are used, they should not affect alpha tested shadows
  5. Diffuse / Detail maps are used, but transparency from textures is ignored
darksylinc commented 3 years ago

Related to #163