You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a native Direct3D 12 implementation of the built-in AlphaTestEffect from XNA Game Studio 4 (Microsoft.Xna.Framework.Graphics.AlphaTestEffect) which supports per-pixel alpha testing, vertex color, and fogging.
This effect requires SV_Position and TEXCOORD0. It requires COLOR if per-vertex colors are enabled (EffectFlags::VertexColor).
Properties
SetTexture: Associates a texture and sampler descriptor with the effect.
SetReferenceAlpha: Sets the alpha reference value for the test.
Exceptions
The ctor can throw std::invalid_argument or std::bad_alloc.
Apply can throw std::runtime_error for invalid alphaFunction modes or if there's no texture or sampler set.
The property methods of this implementation do not throw C++ exceptions.
Remarks
Does not support lighting (EffectFlags::Lighting or EffectsFlags::PerPixelLighting). The EffectFlags::BiasedVertexNormals flag is ignored by this effect.
The EffectFlags::Texture flag is always enabled for this effect, so use or absence of this flag is ignored for this effect.
This effect is primarily used to implement techniques that relied on legacy Direct3D 9 alpha testing render state. This effect is independent of the depth/stencil tests set in D3D12_DEPTH_STENCIL_DESC.DepthFunc and StencilFunc.