Test array texture
This commit is contained in:
parent
2b62d3b9e4
commit
51325d8650
4 changed files with 80 additions and 22 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
out vec4 outputColor;
|
||||
|
||||
uniform sampler2D texture0;
|
||||
uniform sampler2D texture1;
|
||||
uniform sampler2DArray texture0;
|
||||
|
||||
uniform vec3 viewPos;
|
||||
uniform vec3 lightPos;
|
||||
|
|
@ -19,14 +18,11 @@ in float RealType;
|
|||
|
||||
void main()
|
||||
{
|
||||
vec4 color0 = texture(texture0, TexCoord);
|
||||
vec4 color1 = texture(texture1, TexCoord);
|
||||
vec4 color0 = texture(texture0, vec3(TexCoord, TexType.x));
|
||||
|
||||
vec3 norm = normalize(Normal);
|
||||
|
||||
float inclineFactor = abs(norm.y);
|
||||
|
||||
vec4 finalColor = mix(color0, color1, norm.y);
|
||||
vec4 finalColor = color0; //mix(color0, color1, norm.y);
|
||||
|
||||
vec3 lightDir = normalize(lightPos - FragPos);
|
||||
float diff = max(dot(norm, lightDir), 0.0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue