Jump to content
  • Advertisement
Sign in to follow this  
BlackBrain

Help on a Light pre pass renderer

This topic is 2103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey .

 

 I am developing a simple graphics engine using SharpDX . I decided to use Light Pre Pass method for lighting.

I'm using a light buffer with the format R16G16B16A16_Float . It's working ok until I use speculars . 

I am using a Blend state like this : 

 

                BlendStateDescription desc = new BlendStateDescription();
                desc.AlphaToCoverageEnable = true;
                desc.RenderTarget[0].AlphaBlendOperation = BlendOperation.Add;
                desc.RenderTarget[0].BlendOperation = BlendOperation.Add;
                desc.RenderTarget[0].DestinationAlphaBlend = BlendOption.One;
                desc.RenderTarget[0].DestinationBlend = BlendOption.One;
                desc.RenderTarget[0].SourceAlphaBlend = BlendOption.One;
                desc.RenderTarget[0].SourceBlend = BlendOption.One;
                desc.RenderTarget[0].IsBlendEnabled = true;
                desc.RenderTarget[0].RenderTargetWriteMask = ColorWriteMaskFlags.All;
                BlendState state = new BlendState(Graphics.GraphicsRenderer.device, desc);
 
 
so when I am writing to Light Render Target , When I write  :
return saturate(float4(NdotL*att*LightColor,1.0f));
it's ok. When I write :
return saturate(float4(NdotL*att*LightColor,0.5f));
 
But suddenly when I write : 
return saturate(float4(NdotL*att*LightColor,0.4f));
 
It's all dark now !
Thanks in advance and sorry for my poor English
Edited by BlackBrain

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!