This commit is contained in:
Anuken
2020-01-07 00:24:37 -05:00
parent 3ae8065cf1
commit c474b082cd
3 changed files with 12 additions and 12 deletions

View File

@@ -403,8 +403,8 @@ public class Bloom{
private static Mesh createFullScreenQuad(){ private static Mesh createFullScreenQuad(){
float[] verts = {-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1}; float[] verts = {-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1};
Mesh tmpMesh = new Mesh(true, 4, 0, new VertexAttribute( Mesh tmpMesh = new Mesh(true, 4, 0, new VertexAttribute(
Usage.Position, 2, "a_position"), new VertexAttribute( Usage.position, 2, "a_position"), new VertexAttribute(
Usage.TextureCoordinates, 2, "a_texCoord0")); Usage.textureCoordinates, 2, "a_texCoord0"));
tmpMesh.setVertices(verts); tmpMesh.setVertices(verts);
return tmpMesh; return tmpMesh;

View File

@@ -17,18 +17,18 @@ public class IndexedRenderer implements Disposable{
private Shader program = new Shader( private Shader program = new Shader(
Strings.join("\n", Strings.join("\n",
"attribute vec4 " + Shader.POSITION_ATTRIBUTE + ";", "attribute vec4 " + Shader.positionAttribute + ";",
"attribute vec4 " + Shader.COLOR_ATTRIBUTE + ";", "attribute vec4 " + Shader.colorAttribute + ";",
"attribute vec2 " + Shader.TEXCOORD_ATTRIBUTE + "0;", "attribute vec2 " + Shader.texcoordAttribute + "0;",
"uniform mat4 u_projTrans;", "uniform mat4 u_projTrans;",
"varying vec4 v_color;", "varying vec4 v_color;",
"varying vec2 v_texCoords;", "varying vec2 v_texCoords;",
"", "",
"void main(){", "void main(){",
" v_color = " + Shader.COLOR_ATTRIBUTE + ";", " v_color = " + Shader.colorAttribute + ";",
" v_color.a = v_color.a * (255.0/254.0);", " v_color.a = v_color.a * (255.0/254.0);",
" v_texCoords = " + Shader.TEXCOORD_ATTRIBUTE + "0;", " v_texCoords = " + Shader.texcoordAttribute + "0;",
" gl_Position = u_projTrans * " + Shader.POSITION_ATTRIBUTE + ";", " gl_Position = u_projTrans * " + Shader.positionAttribute + ";",
"}"), "}"),
Strings.join("\n", Strings.join("\n",
"#ifdef GL_ES", "#ifdef GL_ES",
@@ -226,9 +226,9 @@ public class IndexedRenderer implements Disposable{
if(mesh != null) mesh.dispose(); if(mesh != null) mesh.dispose();
mesh = new Mesh(true, 6 * sprites, 0, mesh = new Mesh(true, 6 * sprites, 0,
new VertexAttribute(Usage.Position, 2, "a_position"), new VertexAttribute(Usage.position, 2, "a_position"),
new VertexAttribute(Usage.ColorPacked, 4, "a_color"), new VertexAttribute(Usage.colorPacked, 4, "a_color"),
new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoord0")); new VertexAttribute(Usage.textureCoordinates, 2, "a_texCoord0"));
vertices = new float[6 * sprites * vsize]; vertices = new float[6 * sprites * vsize];
mesh.setVertices(vertices); mesh.setVertices(vertices);
} }

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=230db37c657820ae837eac9758307dd4b22c107d archash=a85dbe44f7fb7aa66a28755931efee5e2e294a29