We get it. We use ad blockers too. But GameDev.net needs to display ads in order to continue to be a great platform for you.
Please whitelist GameDev.net. We take safe browsing seriously and review our ads on a regular basis.
Also consider a GDNet+ subscription to remove bulk/3rd party ads.
Jump to content
This is not recommended for shared computers
Sign in anonymously
Don't add me to the active users list
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)?
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:
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:)
07 November 2015 - 09:12 AM
Thank you for Reply
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?
21 April 2014 - 11:14 AM
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
It works, no Jittering, but i have some odd "stairs"
So whats going on here?
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC