Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:19:27+00:00 2026-06-12T01:19:27+00:00

I am trying to implement deferred shading using MRTs. For that, I need to

  • 0

I am trying to implement deferred shading using MRTs. For that, I need to accumulate the color and the normals in two rendering targets. I defined two R32G32B32A32 textures for that end.

The pixel buffer outputs to both rendering targets. However, how do I instruct it to accumulate the values, rather than replace or blend them?

I tried defining the following blending state:

blendState.RenderTarget[0].BlendEnable =            TRUE;
blendState.RenderTarget[0].RenderTargetWriteMask =  D3D11_COLOR_WRITE_ENABLE_ALL;
blendState.RenderTarget[0].SrcBlend =               D3D11_BLEND_ONE;
blendState.RenderTarget[0].DestBlend =              D3D11_BLEND_ONE;
blendState.RenderTarget[0].BlendOp =                D3D11_BLEND_OP_ADD;
blendState.RenderTarget[0].SrcBlendAlpha =          D3D11_BLEND_ONE;
blendState.RenderTarget[0].DestBlendAlpha =         D3D11_BLEND_ONE;
blendState.RenderTarget[0].BlendOpAlpha =           D3D11_BLEND_OP_ADD;
blendState.RenderTarget[1].BlendEnable =            TRUE;
blendState.RenderTarget[1].RenderTargetWriteMask =  D3D11_COLOR_WRITE_ENABLE_ALL;
blendState.RenderTarget[1].SrcBlend =               D3D11_BLEND_ONE;
blendState.RenderTarget[1].DestBlend =              D3D11_BLEND_ONE;
blendState.RenderTarget[1].BlendOp =                D3D11_BLEND_OP_ADD;
blendState.RenderTarget[1].SrcBlendAlpha =          D3D11_BLEND_ONE;
blendState.RenderTarget[1].DestBlendAlpha =         D3D11_BLEND_ONE;
blendState.RenderTarget[1].BlendOpAlpha =           D3D11_BLEND_OP_ADD;

But the values I’m getting are weird.

Please help! How do I accumulate values?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:19:29+00:00Added an answer on June 12, 2026 at 1:19 am

    To implement deferred shading you technically should not accumulate either normals or color, since when you will do the deferred processing (light calculations/occlusion/depth of field…), each MRT texture pixel(color/depth/normals), need to represent the closest object from the view point.

    So only setting a depth state to read/write and comparison function to either less/lessequal, with no blend at all should be the way to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement the folowing scenario, using JQuery deferred, without much luck. What
I'm trying to implement very basic deferred shading in DirectX9. I have the ability
Trying to implement Piwik using REST API over http but need a little help.
Trying to implement something similar to qtip, but using a table that compares the
I'm trying implement server code of Server-Sent Events in a generic way that any
I'm trying implement a bracket in my program (using C#/.NET MVC) and I am
Trying to implement search with Sunspot Gem wich is using Solr.Fulltext search works fine
Trying to implement a function that will return a list of ints the represent
I'm trying implement a way to recursively template using jsRender. The issue is, my
SetFocus I'm trying implement the above Se Focus code in a Class Library that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.