Update for AtlasBuilder ok
Need to improuve duplicate vertex for mapping texture.
This commit is contained in:
parent
4777783ffb
commit
b9a2b87fe9
11 changed files with 160 additions and 33 deletions
|
|
@ -3,15 +3,17 @@
|
|||
out vec4 outputColor;
|
||||
|
||||
uniform vec3 viewPos;
|
||||
uniform sampler2D texture0;
|
||||
|
||||
in vec4 Color;
|
||||
in vec4 FarColor;
|
||||
in vec3 FragPos;
|
||||
in vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
float distance = length(viewPos - FragPos);
|
||||
float interpolationFactor = clamp(distance / 1000, 0.0, 1.0);
|
||||
float interpolationFactor = clamp(distance / 1000.0, 0.0, 1.0);
|
||||
|
||||
outputColor = mix(Color, FarColor, interpolationFactor);
|
||||
vec4 textureColor = texture(texture0, TexCoord);
|
||||
outputColor = mix(textureColor, FarColor, interpolationFactor);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue