Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


esoufiane

Member Since 05 Sep 2012
Offline Last Active Dec 23 2014 10:02 AM

Posts I've Made

In Topic: help on hdr rendering

05 April 2014 - 07:13 AM

 

 

Isn't it just possible to write a compute shader that goes over all pixels and sum all of log luminances and put it in a float . then simply we can multiply this float value by 1/N either by cpu or gpu ?

 

This can be done by using Parallel Reduction algorithm:

http://developer.download.nvidia.com/compute/cuda/1.1-Beta/x86_website/projects/reduction/doc/reduction.pdf

 

 

Which basically amounts to downsampling in the case of a 2D buffer smile.png

 

 

You can store your 2D buffer as 1D contiguous buffer with width*height elements and apply the Parallel reduction algorithm.


In Topic: help on hdr rendering

05 April 2014 - 06:23 AM

Isn't it just possible to write a compute shader that goes over all pixels and sum all of log luminances and put it in a float . then simply we can multiply this float value by 1/N either by cpu or gpu ?

 

This can be done by using Parallel Reduction algorithm:

http://developer.download.nvidia.com/compute/cuda/1.1-Beta/x86_website/projects/reduction/doc/reduction.pdf


In Topic: Software rendering tutorials/examples

14 March 2014 - 08:33 AM

Here is a useful article about software rasterization with an implementation of the half space algorithm.

 

http://devmaster.net/posts/6145/advanced-rasterization


In Topic: Multiple Lights - How to design?

05 October 2012 - 11:00 AM

You don't need to redraw your objects for every light.
You can follow this algorithm:

[source lang="java"]Color finalColor;for every lightif(light is spotLight)finalColor += shadeSpotLight(currentLight);else if (light is omni)finalColor += shadeOmniLight(currentLight);...[/source]

This should be implemented in your pixel shader.

When you became familiar with shaders You can use a Deferred Lighting technique which is much more appropriate for multiple lights.

PARTNERS