Skip to content

Commit cc38805

Browse files
author
LoneWandererProductions
committed
sync fixes
1 parent 5861ad0 commit cc38805

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎Imaging.Texture/TextureFactory.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public static class TextureFactory
187187
{
188188
var activeConfig = config ?? TextureConstants.GetTreeBarkConfig();
189189

190-
return TextureMathEngine.GenerateTreeBark(
190+
return TextureMathEngine.GenerateGnarledTreeBark(
191191
width,
192192
height,
193193
noiseGen,

‎RenderEngine/GLResourceManager.cs‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ private int LazyBakeTexture(int id)
447447

448448
var rawBuffer = entry.Generator(_procWidth, _procHeight, _lazyNoiseGen!);
449449
if (rawBuffer == null) return GetFallbackTexture();
450-
451-
var glHandle = GetTexture(rawBuffer, linearFilter: true);
450+
// IMPORTANT! sharp or blurry.
451+
var glHandle = GetTexture(rawBuffer, linearFilter: false);
452452
_bakedProceduralCache[id] = glHandle;
453453

454454
return glHandle;
@@ -500,10 +500,17 @@ public int GetTexture(RawTextureBuffer rawBuffer, bool linearFilter = false)
500500
PixelType.UnsignedByte,
501501
rawBuffer.PixelData);
502502

503+
// --- Texture Parameters ---
504+
505+
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS,
506+
// (int)TextureWrapMode.ClampToEdge);
507+
//GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT,
508+
// (int)TextureWrapMode.ClampToEdge);
509+
503510
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS,
504-
(int)TextureWrapMode.ClampToEdge);
511+
(int)TextureWrapMode.Repeat);
505512
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT,
506-
(int)TextureWrapMode.ClampToEdge);
513+
(int)TextureWrapMode.Repeat);
507514

508515
if (linearFilter)
509516
{

0 commit comments

Comments
 (0)