Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 05 Jan 2012
Offline Last Active Apr 11 2012 07:15 AM

Posts I've Made

In Topic: VBO based GUI : controls & text.

27 March 2012 - 01:06 PM

Thanks for reply and ideas. I thought for a moment...
GUI may be represented as:


Also it may be represented as (in rendering order): 'Background - Border - TextButton - TextButton - TextButton - Some_other_batched_GUI. So, it's necessary to have some VBO buffers: (Background + Border) - (Button) - (Text) - (Button) - (Text) - (Button) - (Text) - (Some_other_batched_GUI). Yes, this isn't ideally, but this case isn't ordinary\frequent too (Creating text processor isn't in my plansPosted Image). Well, now I should to try implement this ideas.
Neverwinter Nights 2 GUI - this is my idealPosted Image

In Topic: Fog as posteffect

15 February 2012 - 03:06 AM

One thing to remember when doing this is potential issues with alpha blended objects / particles / anything that does not write into depth. Plenty of ways of getting round it (alpha doing their own fogging, rendered after the full screen pass, dithered depth buffer (inferred lighting), etc.), but will require some thought of course.

Yes, you're right. I want to use fog not as weather element - only to cover far objects in fog (e.g. Morrowind). I'm talking about outdoor scenes now. In this case I can to neglect some aspects like particles and other transparent objects - only nearest objects are draw. Well... I think so.

In Topic: Fog as posteffect

14 February 2012 - 10:09 AM

Thanks for reply. Yes I want to implement simple linear fog first. I know the general idea - I have implemented some posteffects before. My problem is in fog factor calculation. I used this formula f = (fogend – d)/(fogend – fogstart), but it doesn't work properly. My fragment shader code (Cg):

struct FS_INPUT
    float4 Position : POSITION; 
    float2 TexCoord : TEXCOORD0;
float4 main(FS_INPUT IN,
   uniform sampler2D ColorMap,
   uniform sampler2D DepthMap,
   uniform float4    fogColor,
   uniform float	 fogStart,
   uniform float	 fogEnd  
   ) : COLOR
  float4 fragmentColor = f4tex2D(ColorMap, IN.TexCoord);
  float4 fragmentDepth = f4tex2D(DepthMap, IN.TexCoord);

  float fogFactor = (fogEnd - length(fragmentDepth)) / (fogEnd - fogStart);
  fogFactor = clamp(fogFactor, 0.0, 1.0);

  return lerp(fragmentColor, fogColor, fogFactor);

In Topic: Assimp: Get bone matrix?

01 February 2012 - 03:36 PM

I have some problems with bind-pose too (see last post there) : http://www.gamedev.n...is/page__st__20

In Topic: Assimp: Get bone matrix?

30 January 2012 - 05:49 AM

I was wondering if there was a way I can just get the bone transformations at their starting positions instead?

Do you mean the bind-pose? You may try to experiment with aiScene->aiMesh->aiBone->mOffsetMatrix.
Assimp themes are actual for me now too.