Additional Fixes

This commit is contained in:
Yong Jian Ming 2025-01-18 17:35:07 +08:00
parent c6e101bd3f
commit f9d1076086
No known key found for this signature in database
GPG Key ID: A9D91E79495C0FAB
4 changed files with 20 additions and 12 deletions

View File

@ -47,8 +47,6 @@
Public Sampler As SamplerState
Public ModelSampler As SamplerState
Public BackgroundColor As Color = New Color(173, 216, 255)
Public OffsetMaps As New Dictionary(Of String, List(Of List(Of Entity)))
@ -92,11 +90,6 @@
Sampler.AddressU = TextureAddressMode.Clamp
Sampler.AddressV = TextureAddressMode.Clamp
ModelSampler = New SamplerState()
ModelSampler.Filter = TextureFilter.Point
ModelSampler.AddressU = TextureAddressMode.Wrap
ModelSampler.AddressV = TextureAddressMode.Wrap
ServersManager = New Servers.ServersManager()
GraphicsDevice.SamplerStates(0) = Sampler

View File

@ -551,7 +551,7 @@
End If
Next
Next
Core.GraphicsDevice.SamplerStates(0) = Core.ModelSampler
Core.GraphicsDevice.SamplerStates(0) = SamplerState.PointWrap
Model.Draw(Me.World, Screen.Camera.View, Screen.Camera.Projection)
Core.GraphicsDevice.SamplerStates(0) = Core.Sampler
If drawViewBox = True Then

View File

@ -44,7 +44,7 @@
End If
Next
Next
Core.GraphicsDevice.SamplerStates(0) = Core.ModelSampler
Core.GraphicsDevice.SamplerStates(0) = SamplerState.PointWrap
_model.Draw(Me.World, Screen.Camera.View, Screen.Camera.Projection)
Core.GraphicsDevice.SamplerStates(0) = Core.Sampler
End If

View File

@ -289,9 +289,24 @@ Public NotInheritable Class BasicEffectWithAlphaTest
Public Sub New(ByVal cloneSource As BasicEffect)
MyBase.New(cloneSource.GraphicsDevice, File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(AppContext.BaseDirectory), "Content", "Effects", "BasicEffectWithAlphaTest.mgfxdx")))
CacheEffectParameters(cloneSource)
DirectionalLight0 = cloneSource.DirectionalLight0
DirectionalLight1 = cloneSource.DirectionalLight1
DirectionalLight2 = cloneSource.DirectionalLight2
With DirectionalLight0
.Direction = cloneSource.DirectionalLight0.Direction
.Enabled = cloneSource.DirectionalLight0.Enabled
.DiffuseColor = cloneSource.DirectionalLight0.DiffuseColor
.SpecularColor = cloneSource.DirectionalLight0.SpecularColor
End With
With DirectionalLight1
.Direction = cloneSource.DirectionalLight1.Direction
.Enabled = cloneSource.DirectionalLight1.Enabled
.DiffuseColor = cloneSource.DirectionalLight1.DiffuseColor
.SpecularColor = cloneSource.DirectionalLight1.SpecularColor
End With
With DirectionalLight2
.Direction = cloneSource.DirectionalLight2.Direction
.Enabled = cloneSource.DirectionalLight2.Enabled
.DiffuseColor = cloneSource.DirectionalLight2.DiffuseColor
.SpecularColor = cloneSource.DirectionalLight2.SpecularColor
End With
World = cloneSource.World
View = cloneSource.View
Projection = cloneSource.Projection