Saturday, July 11, 2026

Darkish/clear-color fog when altering D3D11Viewport for reflection map with DrawIndirect calls


I used to be within the strategy of changing my previous engine doing one draw name per object (with all texture change and so forth) to a DrawIdexedInstancedIndirect (DI3) the place all of the textures are batched in a Texture2DArray in DXT5 format, and all static meshes are additionally batched in a single mesh.

My display screen decision is 1920×1080.

I found an issue when attempting to render a mirrored image map of 512×512 dimension, requiring a viewport change.

All my viewports are min/max depth 0/1, XY top-left 0, and Width and Peak adjusted to the floor of the render goal used.

It really works wonderful for the display screen decision (1920×1080) however once I render the reflexion map (512×512) I see some type of darkish fogging on object removed from the digicam. The impact strikes because the participant strikes.

Then I rendered the scene itself at this 512×512 decision with the viewport used for the reflexion map. The issue appeared clearly as proven within the picture under :

Darkish/clear-color fog when altering D3D11Viewport for reflection map with DrawIndirect calls

Within the heart the scene is rendered usually in opaque mode, full display screen, with solely the fabric texture (no lgiht). On the left the identical scene with 512×512 viewport. On the suitable I set alpha rendering on and the darkened space fades to the default render goal background (sky blue right here).

I have been having bother with this for a few days and I am unable to discover what’s mistaken.

I do not see this downside when doing one Draw name per object with the identical useful resource varieties (eg. DXT5 textures).

Beneath I’ve added some further display screen pictures to higher clarify the issue with the era of the reflection map, that lastly seems someway within the scene itself as properly and in my go for coloured shadows with goal 1024×1024.

Within the image under you’ve got the outcome with materials texture solely when utilizing DI3 (left), with a repair coloration crimson (proper) indicating that the issue ought to come from the feel reads, and at last what I used to be used to get when utilizing one draw name/object that works completely (backside).

The strategy for producing the reflection map is similar in all instances.

Results showing reflection map inset

And eventually, after some cautious inspection of the scene itself, I noticed some bizarre rendering when utilizing solely the feel materials (no lights) with some variations within the side of the rendered triangles within the again scene.

"Weird rendering"

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles