omfg i spelt somthing wrong asdfgh
parent
e9e3491d5d
commit
99bdba59ca
|
@ -104,7 +104,7 @@ public class ParticleRenderer {
|
|||
Matrix4f.rotate((float)Math.toRadians(rotation), new Vector3f(0,0,1), modelMatrix, modelMatrix);
|
||||
Matrix4f.scale(new Vector3f(scale,scale,scale), modelMatrix, modelMatrix);
|
||||
Matrix4f modelViewMatrix = Matrix4f.mul(viewMatrix, modelMatrix, null);
|
||||
storeMatrixData(modelMatrix, vboData);
|
||||
storeMatrixData(modelViewMatrix, vboData);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public class Loader {
|
|||
buffer.put(data);
|
||||
buffer.flip();
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo);
|
||||
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer.capacity(), GL15.GL_STREAM_DRAW);
|
||||
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer.capacity() * 4, GL15.GL_STREAM_DRAW);
|
||||
GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER, 0, buffer);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class Loader {
|
|||
public static void addInstancedAttribute(int vao, int vbo, int att, int dataSize, int instancedDataLength, int offset) {
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo);
|
||||
GL30.glBindVertexArray(vao);
|
||||
GL20.glVertexAttribPointer(0, dataSize, GL11.GL_FLOAT, false, instancedDataLength * 4, offset * 4);
|
||||
GL20.glVertexAttribPointer(att, dataSize, GL11.GL_FLOAT, false, instancedDataLength * 4, offset * 4);
|
||||
GL33.glVertexAttribDivisor(att, 1);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
|
||||
GL30.glBindVertexArray(0);
|
||||
|
|
|
@ -12,14 +12,14 @@ out vec2 textureCoords2;
|
|||
out float blend;
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
uniform float nuberOfRows;
|
||||
uniform float numberOfRows;
|
||||
|
||||
void main(void){
|
||||
|
||||
vec2 textureCoords = position + vec2(0.5, 0.5);
|
||||
textureCoords.y = 1.0 - textureCoords.y;
|
||||
|
||||
textureCoords /= nuberOfRows;
|
||||
textureCoords /= numberOfRows;
|
||||
textureCoords1 = textureCoords + texOffsets.xy;
|
||||
textureCoords2 = textureCoords + texOffsets.zw;
|
||||
blend = blendFactor;
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -12,14 +12,14 @@ out vec2 textureCoords2;
|
|||
out float blend;
|
||||
|
||||
uniform mat4 projectionMatrix;
|
||||
uniform float nuberOfRows;
|
||||
uniform float numberOfRows;
|
||||
|
||||
void main(void){
|
||||
|
||||
vec2 textureCoords = position + vec2(0.5, 0.5);
|
||||
textureCoords.y = 1.0 - textureCoords.y;
|
||||
|
||||
textureCoords /= nuberOfRows;
|
||||
textureCoords /= numberOfRows;
|
||||
textureCoords1 = textureCoords + texOffsets.xy;
|
||||
textureCoords2 = textureCoords + texOffsets.zw;
|
||||
blend = blendFactor;
|
||||
|
|
Loading…
Reference in New Issue