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 18 Jun 2013
Offline Last Active Dec 25 2014 05:08 AM

Posts I've Made

In Topic: Visual studio 2013 (exe release) runs slower compare to VS2010

25 December 2014 - 04:36 AM

It turns out that I forgot to disable CF when I was creating the profile in CCC...


Anyway, now it is 6% faster compared to VS2010 release .exe

In Topic: Why discard pixel take a noticeable performance hit?

17 April 2014 - 04:36 AM

I need to discard the pixels so the alpha part of the texture will not be visible, that i use for the foliage. I can minimize the performance hit by using "discard" only on the parts that i need, however doing this I have to break down the objects creating more objects meaning more cpu load.(example a building have some foliage on it and it is one object all together, now will became two object).

In Topic: How far can you see something?

16 April 2014 - 11:21 AM

In any case you should have:

view distance slider (controlling at what volume and distances an object will no longer be drawn)

detail distance slider (to control the geometry and shared quality at various distances)

In Topic: Smooth normals

10 November 2013 - 10:46 AM

My guess is that exporter didn't smooth them. There might be an option during export or in editor to create smooth normals.

That was the problem.


In the mesh loading function i add this

for(int i=0; i<vertexCount; i++)
		for(int g=0; g<vertexCount; g++)
			if(model[i].x == model[g].x && model[i].y == model[g].y && model[i].z == model[g].z)
				model[i].nx = (model[g].nx+model[i].nx)/2;
				model[i].ny = (model[g].ny+model[i].ny)/2;
				model[i].nz = (model[g].nz+model[i].nz)/2;

add it fix the problem, now it is smooth.

In Topic: Smooth normals

10 November 2013 - 08:20 AM


output.normal = mul(input.normal, (float3x3)worldMatrix);

float4 color;
float c = dot(normalize(input.normal), float3(0,1,0));
color = float4(c,c,c, 1);
return color;

mesh came from sketchup.