Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

lipsryme

Member Since 02 Mar 2010
Offline Last Active Yesterday, 12:01 PM
*****

Topics I've Started

Lens Flare in motion (camera question)

22 May 2013 - 06:15 AM

I'm trying to understand what happens to a lens flare effect during fast motion. Unfortunately I don't have an opportunity to test this myself so I thought someone in here probably knows this. Will the lens flare get affected by the motion blur ? I'm leaning towards yes...since motion blur happens to every "light" that camera sensor receives, right ? So even the light that's not coming in directly and bouncing around the lens should.


Problem with Color Correction and 3D LUT

18 May 2013 - 09:07 AM

I'm having some issues with color correction using a 3D LUT.

I'm using a neutral LUT 16x16x16 from the UnrealEngine page here: http://udn.epicgames.com/Three/rsrc/Three/ColorGrading/RGBTable16x1.png

 

I've open it up in photoshop and saved it as a Volume Texture DDS (32bpp unsigned ARGB8) using the nvidia plugin.

 

And here's my shader:

float4 PS(in VSOutput input) : SV_Target
{
	float3 rawColor = InputTexture0.Sample(LinearClampSampler, input.UV).rgb;

	float3 scale = (float3(16, 16, 16) - 1.0f) / float3(16, 16, 16);
	float3 offset = 1.0f / (2.0f - float3(16, 16, 16));

	float3 colorCorrected = LUT.Sample(LinearClampSampler, scale * rawColor + offset).rgb;
	
	return float4(colorCorrected, 1.0f);
}

The code is from this sample here: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter24.html

Can someone spot the problem ? : /

 

Not sure if the problem has to do with the order of rendering.

I'm currently tonemapping my linear result to a R8G8B8A8_UNORM_SRGB target, then use this as the input for the color correction which then outputs to my R8G8B8A8_UNORM_SRGB backbuffer.

 

Here's a screen of what my result looks like:

http://d.pr/i/xGYR

 

And here's the original for comparison:

http://d.pr/i/I6SL


Gamma Correction & Environment Maps

12 May 2013 - 06:21 AM

I was thinking....in my renderer I currently do:

 

- Render Lighting while using linear space fetch for textures

- Then do post processing

- And in the end after tone mapping I convert back to SRGB.

 

But what about environment maps...

Is it correct to do the same but without the last part ?

So basically for env maps:

 

- Render Lighting while using linear space fetch for textures

- Store env map in linear space as HDR.

 

or is it needed to convert them back to SRGB ?

Keeping them linear does make them a bit more contrast heavy / darker of course so I'm asking if that's correct...?

 


Single vector passing faster than seperate floats ?

06 May 2013 - 07:07 AM

Is it actually faster to pass e.g. 4 float variables as a 4-component vector then just as 4 separate float variables ?

At least somebody told me that. I don't see the difference since it's just a 16 byte aligned array that is being transfered as a constant buffer to the gpu or not ? Is there some secret gpu magic going on that I'm missing ? rolleyes.gif


Deferred lighting and forward rendered geometry

03 May 2013 - 06:05 AM

I'm using a deferred shading approach with a forward alpha blend pass afterwards for e.g. transparent objects.

Currently I'm doing it in this order:

 

1. Shadow Map

2. GBuffer

3. Deferred Lighting

4. Forward alpha blend geometry using their own lighting shader and so on

 

Ofc I'm now having a huge problem getting the correct lighting to my forward rendered geometry.

My biggest problem right now is that I'm calculating atmospheric scattering inside the deferred lighting shader, which gives me light color and diffuse ambient light which is completely missing afterwards in the forward shaded passes.

 

So with that said, is it possible to include the forward rendered stuff in the deferred lighting stage ? Or is there something else I could do ?


PARTNERS