•      Sign In
• Create Account

# alkisbkn

Member Since 21 Feb 2008
Online Last Active Today, 03:50 AM

### Material Layering

18 December 2013 - 10:42 AM

So, as a graphics programmer directly working on mobile games, I haven't really played with the recent trend that I see everywhere regarding material layers, an example is Unreal Engine 4, and more specifically the following article:

http://www.unrealengine.com/files/downloads/2013SiggraphPresentationsNotes.pdf

I understand the need for this and it's awesome! What I haven't grasped yet is, is each layer a separate pass? Can someone explain this to me please?

Many thanks!

### Normal of sine

09 August 2012 - 08:15 PM

Hello,

I have been developing a simple ocean wave "heightfield" composed out of 6 sine waves. Now, I need to find the normal of each vertex, and I am stuck basically. How I calculate my waves:
[source lang="cpp"]float2 dir = float2(1.0f, 0.0f);float dir_vertex = dot(dir, wave_vertex.xz); float wave1 = 25.0f * pow(sin( (2 * PI / 800) * dir_vertex - time * 2 * PI / 45.0f - 105.0f),2);// .... and so on for the others ...vertex.y = wave1 + wave2 + wave3 + wave4 + wave5 + wave6;[/source]
(I know looks ugly, but it works)

Is there a computationally cheap way to find the normal (this is for an iOS game).

Thanks a bunch!

### Directional light cookies

03 June 2012 - 03:56 PM

Hello everyone,

for my deferred rendering engine I am adding cookies for directional lights, the process should be easy - but I am not getting proper results.
Okay, so from the C++ side, I create my directional light View and Projection matrices as such:
```mat4 projection = glm::ortho<float>(-1,1,-1,1,-1,1);
mat4 view = glm::lookAt(vec3(0,0,0), direction, vec3(0,1,0));
```
where direction is normalized. The View and Projection matrices are passed in the shader as Projection * View.

Now we go in the directional light shader where the magic happens. I reconstruct the view space position from the depth buffer (which works as the light renders fine without the cookie), and I embark to sample the cookie texture like this:

```float attenuateFromCookie(sampler2D cookieSampler, vec4 fragmentPos, mat4 lightMatrix)
{
vec4 lightSpacePos = lightMatrix * invView * fragmentPos;
vec2 projCoords = lightSpacePos.xy * projectionScale - 0.5/IN.GBufferSize;
return texture(cookieSampler, projCoords).r;
}
```
where projectionScale is just a vec2 to scale the cookie, so it repeats several times to look good (clouds for example).

Now, the cookie renders fine, however when I move my camera, the cookie goes berserk, moving around very fast. It should be noted that the cookie does not move when my camera is rotated, since I multiply by invView. However, wouldn't this fix the camera translation issue as well?

My guess is I am doing something wrong in the light view matrix.
Can someone help me?

Thanks a lot

### Deferred Rendering and Transparent Objects

23 February 2012 - 10:39 AM

Hello everybody,

I am researching about deferred rendering and especially the handling of transparent objects. I know the "easy" way to do it by rendering them in a separate pass using forward lighting, however could it be possible to integrate them in the deferred pass using an order independent transparency technique such as depth peeling or stochastic transparency?

I would like your views on this
Cheers

### UEA MSc Game Development

09 July 2011 - 05:36 AM

Hello,
I just finished my undergraduate in Greece and I am trying to find a good university for taking on a game development course for MSc. I have a friend studying in the University of East Anglia, however he cannot comment on the specific course, as he is not following it

This is the course's description: UEA Game Development MSc

I am also considering Abertay, Newcastle and Hull Universities.

Any help will be thankful!

PARTNERS