• Create Account

# montify

Member Since 07 Nov 2012
Offline Last Active Today, 01:14 AM

### In Topic: Static Shadowmap from a HeightMap

10 October 2016 - 12:47 AM

thx for answer! i solve the problem.. i simply forgott to do the IF statement into the while loop! ;)

Anybody have a clue how i can port this into a shader(hlsl)?

### In Topic: [XNA] Matrix.CreateRotationX

09 November 2015 - 12:39 AM

Thank you guys for answer, i hardcoded the Matrix.

But i have another issue.

My Planet is normalized Cube with six side.

I create the Noise Value like here described:

https://britonia.wordpress.com/2009/12/23/noise-part-iii-gpu/

The Noise generated for each patch, so the PixelShader needs the Coordinate of the patch (xNW, xNE, xSW).

For the root Patch ( without subedived the quadtree it´s):

```
nw = new Vector3(-1,0, 1);
ne = new Vector3(1, 0, 1);
sw = new Vector3(-1, 0, -1);
```

Assume this is for the TopSide of the Cube.

How i get the noise for the Front side of the Cube?

It´s a 3d noise Funtion in the Shader so how i can translate the nw, se, sw Vector to match the front side (when i pass the right Value i have no seams on the Cube Faces like:)

### In Topic: [XNA] Matrix.CreateRotationX

07 November 2015 - 09:12 AM

the thing is: is have 6 flat grids (33x33 Vertices) i would translate each grid to a Cube. Should the number not -1 or 1 ? Why is it so tiny?

10 October 2015 - 10:57 AM

Found the problem,

Horizon Culling is poor -> http://crappycoding.com/2009/03/horizon-culling/

Anbody knows a better Method?

### In Topic: Use 64bit precision (GPU)

21 April 2014 - 11:14 AM

Update:

Now i do the Relative to the Eye transformation in the VertexShader

```VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{

float3 worldPosition = mul(input.Position, World).xyz;

float3 normalized = normalize(worldPosition);  // Normalize all Vertex to get a Sphere

float4 scaled = float4(normalized * SeaLevel, 1);  // Scale all Vertex with SeaLevel = 6000

scaled -= float4(camPosition, 1); //All geometry relative to the Eye

output.Position = mul(scaled, ViewProj);
output.Position.z = log(C*output.Position.z + 1) / log(C*Far + 1) * output.Position.w; //Logarithmic Depth Buffer
return output;
}
```

It works, no Jittering, but i have some odd  "stairs"

So whats going on here?

PARTNERS