Default blend state for transparent objects
#1
Hi,

I've ran into this behavior:

  1. Create object with PBR material
  2. Set HasTransparency to true
  3. Set alpha to 0 (should be invisible).
It can be reproduced by modifying PBRPropertiesSample.CreateSampleScene (skip the texture initialization and the updates and only set the values as described above).

When you rotate around the object, you can see other objects behind it with a color tint that corresponds to the material base color. Is this expected behavior? 

I assume it's caused because the transparent queue uses PremultipliedAlphaBlend (that's just my assumption) and setting the materials blend state to DXDevice.CommonState.NonPremultipliedAlphaBlend resolves this issue.

Is there a way to set it globally? And what possible effects it could have? Just so that I know if I should do it on per-object basis.

Best regards,
Roman Janovsky
  


Messages In This Thread
Default blend state for transparent objects - by janovrom - 05-26-2022, 04:57 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)