Change skeleton and zombie angles to degrees, use face culling on translucent blocks when the player isn't inside a translucent blocks.

This commit is contained in:
UnknownShadow200 2015-07-03 07:11:50 +10:00
parent 71a26da049
commit ae1105d5d9
3 changed files with 12 additions and 7 deletions

View File

@ -63,8 +63,8 @@ namespace ClassicalSharp.Model {
Set.Torso.Render();
DrawRotate( 0, 0.75f, 0, leftLegXRot, 0, 0, Set.LeftLeg );
DrawRotate( 0, 0.75f, 0, rightLegXRot, 0, 0, Set.RightLeg );
DrawRotate( 0, 1.375f, 0, 90f, 0, leftArmZRot, Set.LeftArm );
DrawRotate( 0, 1.375f, 0, 90f, 0, rightArmZRot, Set.RightArm );
DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, leftArmZRot, Set.LeftArm );
DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, rightArmZRot, Set.RightArm );
}
public override void Dispose() {

View File

@ -62,8 +62,8 @@ namespace ClassicalSharp.Model {
Set.Torso.Render();
DrawRotate( 0, 0.75f, 0, leftLegXRot, 0, 0, Set.LeftLeg );
DrawRotate( 0, 0.75f, 0, rightLegXRot, 0, 0, Set.RightLeg );
DrawRotate( 0, 1.375f, 0, 90f, 0, leftArmZRot, Set.LeftArm );
DrawRotate( 0, 1.375f, 0, 90f, 0, rightArmZRot, Set.RightArm );
DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, leftArmZRot, Set.LeftArm );
DrawRotate( 0, 1.375f, 0, (float)Math.PI / 2, 0, rightArmZRot, Set.RightArm );
graphics.AlphaTest = true;
}

View File

@ -216,10 +216,14 @@ namespace ClassicalSharp {
// Render translucent(liquid) blocks. These 'blend' into other blocks.
Graphics.BeginIndexedVbBatch();
Graphics.Texturing = false;
Graphics.AlphaBlending = false;
bool canCullTranslucent = !Window.BlockInfo.IsTranslucent(
(byte)Window.LocalPlayer.BlockAtHead );
if( canCullTranslucent )
Graphics.FaceCulling = true;
// First fill depth buffer
Graphics.Texturing = false;
Graphics.AlphaBlending = false;
Graphics.ColourWrite = false;
for( int batch = 0; batch < _1Dcount; batch++ ) {
RenderTranslucentBatchDepthPass( batch );
@ -237,6 +241,8 @@ namespace ClassicalSharp {
Graphics.AlphaTest = false;
Graphics.AlphaBlending = false;
Graphics.Texturing = false;
if( canCullTranslucent )
Graphics.FaceCulling = false;
Graphics.EndIndexedVbBatch();
}
@ -321,7 +327,6 @@ namespace ClassicalSharp {
for( int i = 0; i < chunks.Length; i++ ) {
ChunkInfo info = chunks[i];
if( info.TranslucentParts == null || !info.Visible ) continue;
ChunkPartInfo part = info.TranslucentParts[batch];
if( part.IndicesCount > 0 ) {
if( part.IndicesCount > maxIndices ) {