Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


xlope01

Member Since 18 Jun 2013
Offline Last Active Sep 28 2014 09:08 AM

Posts I've Made

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

cb11.png

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

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

mesh came from sketchup.


In Topic: Smooth normals

09 November 2013 - 06:19 PM

That is pretty much what I was doing. with the difference that i use the worldMatrix instead of the ViewMatrix like you did in the VS. Still no smooth normals.sad.png

There's a way to change the angle of smoothing to see what happens?


PARTNERS