Cleanup dans optimization renderer.
This commit is contained in:
		| @@ -272,7 +272,6 @@ void World::RenderWorld(int& rendercount, int& badhitcount, Player& player, Tran | ||||
| 	direct.y = 0; | ||||
| 	direct.Normalize(); | ||||
| 	pos.y = 1; | ||||
| 	//renderManifest.clear(); | ||||
|  | ||||
| 	static Vector3i renderManifest[VIEW_DISTANCE * 4]; | ||||
|  | ||||
| @@ -302,38 +301,22 @@ void World::RenderWorld(int& rendercount, int& badhitcount, Player& player, Tran | ||||
| 			cosinus = .99939082701; | ||||
| 			echantillons = 45; | ||||
| 		} | ||||
| 		else /*if (dist > VIEW_DISTANCE * .75f)*/ {  | ||||
| 		else {  | ||||
| 			angle.x = direct.z + direct.x; | ||||
| 			angle.z = direct.z - direct.x; | ||||
| 			sinus = .05233595624; | ||||
| 			cosinus = .99862953475; | ||||
| 			echantillons = 30; | ||||
| 		} | ||||
| 		//else if (dist > VIEW_DISTANCE * .875f) { // - CHUNK_SIZE_X * 28) { | ||||
| 		//	angle.x = direct.z; | ||||
| 		//	angle.z = -direct.x; | ||||
| 		//	sinus = .08715574274; | ||||
| 		//	cosinus = .996194698091; | ||||
| 		//	echantillons = 36; | ||||
| 		//	//echantillons = 0; | ||||
| 		//} | ||||
| 		//else { | ||||
| 		//	angle.x = direct.z; | ||||
| 		//	angle.z = -direct.x; | ||||
| 		//	sinus = .13052619222; | ||||
| 		//	cosinus = .99144486137; | ||||
| 		//	echantillons = 24; | ||||
| 		//} | ||||
|  | ||||
| 		angle.y = 0; | ||||
| 		angle.Normalize(); | ||||
|  | ||||
| 		for (int radar = 0; radar < echantillons; ++radar) { | ||||
| 			float x = angle.x; | ||||
| 			float z = angle.z; | ||||
|  | ||||
| 			angle.x = x * cosinus - z * sinus; | ||||
| 			angle.z = z * cosinus + x * sinus; | ||||
| 			angle.x = angle.x * cosinus - angle.z * sinus; | ||||
| 			angle.z = angle.z * cosinus + x * sinus; | ||||
| 			angle.Normalize(); | ||||
|  | ||||
| 			cursor = pos - direct * CHUNK_SIZE_X * 2 + angle * dist; | ||||
| @@ -359,7 +342,6 @@ void World::RenderWorld(int& rendercount, int& badhitcount, Player& player, Tran | ||||
| 					ChunkAt(cursor)->Render(); | ||||
| 					world.ApplyTranslation(-(chx - m_center[0]) * CHUNK_SIZE_X, 0, -(chy - m_center[1]) * CHUNK_SIZE_Z); | ||||
| 					renderManifest[++rendercount] = Vector3i(chx, 0, chy); | ||||
| 					//++rendercount; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user