Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 26 Mar 2006
Offline Last Active Jan 03 2013 03:34 PM

Topics I've Started

About non-integer pixel centers & AA

18 August 2012 - 05:42 AM

Hi ,

When I tried to port a working FXAA D3D/HLSL shader to OGL / GLSL , the output looked like it was shifted.

Unlike D3D , it seems pixel centers are not integers , but indexed as 0.5 , 1.5 , 2.5 ...

Specifically I am interested in understanding how non-integer pixel centers could cause a difference
and how it can be fixed/compensated for.

( Assuming that this is the root cause of my problem based on some threads I saw on web)


Chromatic Aberration

26 July 2012 - 08:09 AM

Hi ,

As for this effect , I am trying to find a nice way to make "horizontal/vertical leak lines" to disappear.

( Horizontal example : http://active.tutsplus.com/tutorials/effects/create-a-retro-crt-distortion-effect-using-rgb-shifting/
2nd cat photo in the page )

( Vertical example : )

So for such an effect like this , how would you suggest me to implement it ?
( Not asking how to do it , but asking what to do )

Many thanks

GLSL Screen Space Position

02 April 2012 - 02:26 PM

Hi all ,

I need to know the GLSL equivalent of HLSL VPOS semantics , which gives you screen space position
as normalised ( in range of 0-1 and 0-1 for both dimensions ) .

I checked gl_FragCoord but I dont think it is normalised. Could you advise about porting VPOS to GLSL ?

many thanks in advance

GLSL `Semantics/BuiltIn Variables` & `centroid` & `Interface blocks`

29 March 2012 - 04:51 AM

Hi everyone ,

I have some questions regarding porting HLSL to GLSL :

1. Regarding the HLSL shader framework I have , I have large structs
with member variables which use semantics such as Color Color1 Vpos Vface Texcoord[N] and Texcoord[N]_centroid...

As I understand , there are no semantics in GLSL , but built-in variables such gl_fragColor and so on.

So my question is that what woud you suggest to port those structs with variables using semantics ?
Shall I make member variables with semantics global or are there any other ways you could suggest ?

2. I can`t use `location` qualifier and `centroid in/out` qualifier at the same time

I can have a struct like :

out struct test
   centroid in float red;
   layout(location = 1) float green;
   layout(location = 2) float blue;
  } ;

but I cant have :

out struct test
   layout(location = 0) centroid in float red;
   layout(location = 1) float green;
   layout(location = 2) float blue;
  } ;

The compiler says : `Location can be set only once `

On the other hand I can use `centroid in/out` qualifier together with location qualifier for a variable :

layout(location = 0) centroid out float t1;

So how can I use the centroid in/out qualifier at the same time with a location qualifier
for a struct member ?

3. I am trying to understand the difference between a struct and an interface block( in/out/uniform ).
I guess you can just create one instance of an interface so they will be just a set of global variables ?

Could you comment for my portfolio ?

08 October 2011 - 11:21 AM


I`d like to know your critiques for My portfolio

thanks in advance