Jump to content

  • Log In with Google      Sign In   
  • Create Account


Paxi

Member Since 09 Dec 2012
Offline Last Active Jun 27 2014 12:16 PM
-----

Posts I've Made

In Topic: Per-pixel displacement mapping GLSL

04 May 2014 - 03:51 AM

Actually i have no idea why it works. But it works when i do NOT normalize the view and light direction in the VS.

So instead of this:

vec3 fvViewDirection  = normalize( uCameraDirection - posObject.xyz);
vec3 fvLightDirection = normalize( uLightPos.xyz - posObject.xyz );

I got this now:

vec3 fvViewDirection  = uCameraDirection - posObject.xyz;
vec3 fvLightDirection = uLightPos.xyz - posObject.xyz;

Here is a final video:
http://www.paxi.at/random/final.avi


In Topic: Per-pixel displacement mapping GLSL

03 May 2014 - 09:11 AM

Unfortunately no change. I tried that already before, the uModel matrix is in fact only a idently matrix at the moment.

 

Some more suggestions from my side:

 


In Topic: Per-pixel displacement mapping GLSL

03 May 2014 - 04:21 AM

When I´m flipping the binormal, the effect is more visibile at the other side of the quad.

In general it seems to me, that the uv coordinates are "moved" a little bit when im getting closer and therefore the texture is not applied correctly anymore.

 

Attached File  5.jpg   164.85KB   2 downloads

 

I also added a video http://paxi.at/random/sfg_com.avi


In Topic: Per-pixel displacement mapping GLSL

02 May 2014 - 09:08 AM

Thank for your suggestion.

My camera direction was really inverted, but I invert it in the TraceRay method again (

vec2 dUV = - dir.xy * height * 0.08;

dir is the cameradirection in tangent space.

).

I tried changing to 

normalize( posObject.xyz - uCameraDirection );

and without inverting in the TraceRay method but I get the same result unfortunately :(


In Topic: getting pixel format with wglChoosePixelFormatARB

10 February 2013 - 04:45 PM

Thank you very much. I just started with OpenGL but wanted to port my old Windows System class first, I used with my DX9 framework before getting into OpenGL itself so i did not know about that. It seems that immediate mode rendering stopped working with 3.2. Creating a render context >= 3.2 causes my screen to stay black.


PARTNERS