30 lines
799 B
Java
30 lines
799 B
Java
package io.github.hydos.ginger.engine.shadow;
|
|
|
|
import org.joml.Matrix4f;
|
|
|
|
import io.github.hydos.ginger.engine.render.shaders.ShaderProgram;
|
|
|
|
public class ShadowShader extends ShaderProgram
|
|
{
|
|
private static final String VERTEX_FILE = "shadowVertexShader.glsl";
|
|
private static final String FRAGMENT_FILE = "shadowFragmentShader.glsl";
|
|
private int location_mvpMatrix;
|
|
|
|
protected ShadowShader()
|
|
{ super(VERTEX_FILE, FRAGMENT_FILE); }
|
|
|
|
@Override
|
|
protected void getAllUniformLocations()
|
|
{ location_mvpMatrix = super.getUniformLocation("mvpMatrix"); }
|
|
|
|
protected void loadMvpMatrix(Matrix4f mvpMatrix)
|
|
{ super.loadMatrix(location_mvpMatrix, mvpMatrix); }
|
|
|
|
@Override
|
|
protected void bindAttributes()
|
|
{
|
|
super.bindAttribute(0, "in_position");
|
|
super.bindAttribute(1, "in_textureCoords");
|
|
}
|
|
}
|