Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/resources/assets/rockbottom/shader/break.vert
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;

uniform vec3 camera;

void main(){
vertexColorPass = color;
texCoordPass = texCoord;
breakTexCoordPass = breakTexCoord;

mat4 mvp = projection * view * model;
gl_Position = mvp * vec4(position, 0.0, 1.0);
gl_Position = mvp * vec4(vec2((position.xy - camera.xy) * camera.z), 0.0, 1.0);
}
4 changes: 3 additions & 1 deletion src/main/resources/assets/rockbottom/shader/gui.vert
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;

uniform float scale;

void main(){
vertexColorPass = color;
texCoordPass = texCoord;

mat4 mvp = projection * view * model;
gl_Position = mvp * vec4(position, 0.0, 1.0);
gl_Position = mvp * vec4(position * scale, 0.0, 1.0);
}
4 changes: 3 additions & 1 deletion src/main/resources/assets/rockbottom/shader/world.vert
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;

uniform vec3 camera;

void main(){
vertexColorPass = color;
texCoordPass = texCoord;

mat4 mvp = projection * view * model;
gl_Position = mvp * vec4(position, 0.0, 1.0);
gl_Position = mvp * vec4(vec2((position.xy - camera.xy) * camera.z), 0.0, 1.0);
}