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

mauro78

Member Since 14 Dec 2008
Offline Last Active Nov 09 2012 12:36 PM
-----

Topics I've Started

Camera Glow Shader

06 November 2012 - 02:49 PM

Hi All,

I really want to add an effect like this to our 3D Engine:

Posted Image


This is the so-called Mental Ray "Camera Glow Shader". We want it to apply such effects to some objects we have in the level.
Any idea/guideline about implement this?

Regards

Mauro
Ion6

Packing Data Advice

26 September 2012 - 01:23 PM

Hi All,

During a deferred pass on a D3DFMT_A16B16G16R16F render target I come across this problem:

I'm correctly computing a "in-scatter" value which is a float3 where every component are a 16bit float.

Is there a good way to store (even with a little loss of precision) those 3 values into a single float (16bit)?

Hints/help/link appreciated....thx

EDIT: scatter is a float3 where every component is in the [0,1] range


Mauro
IoN6 Games

Scissor region from bounding sphere

03 June 2012 - 12:45 PM

Hi All, I've spent all day trying to implement Lengyel method's for computing "Scissor" region for a spehere.

http://www.opengl.org/discussion_boards/showthread.php/151023-scissor-region-from-bounding-sphere

code is for OpenGL and I'm working on Directx. Basically my adaptation is:
  • Compute light pos in camera space and then negate Z component
  • Compute aspect ratio = (screenW/screenH)
  • Compute e (focal lenght) as 1/tan(FOV/2)
  • Invoke Project_Sphere function
  • Set scissor rect based on top function results (scaling them from [-1,1] to screen coords

results are ok If I'm "inside" the light volume or light is not visible: problem arises when intersection are computed.
Basically the returned rect is very small compared to results I'm expecting....any advice?

Deferred Shadows and precision

04 May 2012 - 03:22 PM

Hi All!

I'm trying to reuse the g-buffer for computing a "shadows mask or buffer"; basically after computing the appropriate Shadows Map for a light (point,directional or spot) I just want to reuse g-buffer stored position for performing shadows check for shadows receiving geometry.

Now comes a little problem: If I just store world or view space position (viewpos.x,viewpos.y,viewpos.z) in the g-buffer everything is fine Posted Image

If I try to store just view space lenght and reconstruct position (just to save memory bandwidth), on shadows check I just got some artifacts almoust just on "caster" geometry and when the camera comes close to them (look at red circle):

Posted Image


in that case depth is stored like this:

float depth = length(ViewPos);

and reconstructed like this:


float3 ER = float3(vScreenCoord.x*gScreenRatio,vScreenCoord.y,1/(tan(gHalfFOV)));
float4 posView = float4(( normalize(ER) * g_buffer_depth),1.0f);


To solve the problem I've raise SHADOWS_EPSILON (or BIAS) value but this lead to other problems...so I'm wondering if someone can point me out where the problem can be.....it's just a numerical imprecision problem?

Any advice appreciated Posted Image

Thanks Mauro


p.s.
I've been using this reconstruction for deferred lighting in the past months without noticeable artifacts....but probably Shadows artifacts are more sensitive to numerical errors

[Tools Programming] MFC vs .NET

16 January 2012 - 02:52 PM

Hi All!

Since now we've used MFC for the development of our game editor.
Basically the Tool is linked with our graphics library (a WIN32 static library that cares about 3d rendering mostly).

I'm wondering if switching to .NEt or WPF could give us a major benefit in terms of productivity.
Creating properties window, forms and other object with MFC is time consuming so we're searching for better solutions. Also we're gonna need to create timeline form to control animation and similar controls.


I'll be happy to have some advice on the topic

Mauro

PARTNERS