materials are now created by specifying shaders

shader uniforms are added to materials
This commit is contained in:
devZoGok
2021-11-10 20:23:15 +02:00
parent 34e7a74bba
commit ec8dd7ac1e
17 changed files with 321 additions and 213 deletions
+9 -2
View File
@@ -5,9 +5,16 @@ in vec3 texCoords;
layout (location = 0) out vec4 FragColor;
layout (location = 1) out vec4 BrightColor;
uniform samplerCube skybox;
struct Texture{
float mixRatio;
samplerCube pastTexture, nextTexture;
bool animated;
};
uniform Texture tex;
void main(){
BrightColor = vec4(0);
FragColor = texture(skybox, texCoords);
//vec4 texColor = (tex.animated ? mix(tex.pastTexture, tex.nextTexture, tex.mixRatio) : tex.nextTexture);
FragColor = texture(tex.pastTexture, texCoords);
}