小编use*_*287的帖子

使用纹理图集时HLSL颜色出血

我正在用C#/ XNA制作游戏.我正在研究我将用于地形的着色器.我正在使用纹理图集来提高速度和效率,但我在瓷砖之间遇到纹理/颜色渗色:http: //i.imgur.com/lZcESsn.png

我在FX Composer和我的游戏中都得到了这个效果.这是我的着色器:

//-----------------------------------------------------------------------------
// InstancedModel.fx
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------


// Camera settings.
float4x4 World : World < string UIWidget="None"; >;
float4x4 View : View < string UIWidget="None"; >;
float4x4 Projection : Projection < string UIWidget="None"; >;

// This sampler uses a simple Lambert lighting model.
float3 LightDirection = normalize(float3(-1, -1, -1));
float3 DiffuseLight = 1.25;
float3 AmbientLight = 0.25;

float TextureSide = 0; …
Run Code Online (Sandbox Code Playgroud)

shader textures hlsl atlas

3
推荐指数
1
解决办法
1861
查看次数

标签 统计

atlas ×1

hlsl ×1

shader ×1

textures ×1