2D Sprite Renderer and sprite framework, Began additional OpenGL Renderer, started transitioning multiplayer networking to use Java NIO
This commit is contained in:
parent
5a05b9d65e
commit
3e886e5ba8
165 changed files with 4460 additions and 5485 deletions
|
|
@ -6,7 +6,7 @@ layout(location = 0) in vec2 inUV;
|
|||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
layout(push_constant) uniform pc {
|
||||
layout(offset = 24) uint textureIndex;
|
||||
layout(offset = 28) uint textureIndex;
|
||||
} push_constants;
|
||||
|
||||
layout(set = 1, binding = 0) uniform sampler2D spriteTextures[MAX_TEXTURES];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ layout(location = 0) in vec2 inUV;
|
|||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
layout(push_constant) uniform pc {
|
||||
layout(offset = 24) uint textureIndex;
|
||||
layout(offset = 28) uint textureIndex;
|
||||
} push_constants;
|
||||
|
||||
layout(set = 1, binding = 0) uniform sampler2D spriteTextures[MAX_TEXTURES];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ layout(push_constant) uniform pc {
|
|||
vec2 modelSize;
|
||||
vec2 position;
|
||||
vec2 screenSize;
|
||||
|
||||
float zAmount;
|
||||
} push_constants;
|
||||
|
||||
layout(set = 0, binding = 0) uniform ViewUniform{
|
||||
|
|
@ -22,7 +22,7 @@ layout(set = 0, binding = 0) uniform ViewUniform{
|
|||
void main() {
|
||||
vec2 ScaledPos = inPos * push_constants.modelSize;
|
||||
vec2 worldPos = push_constants.position + ScaledPos;
|
||||
worldPos += viewUniform.camPos;
|
||||
worldPos += (viewUniform.camPos * push_constants.zAmount);
|
||||
vec2 ndc = vec2(
|
||||
(worldPos.x / push_constants.screenSize.x) * 2.0 - 1.0,
|
||||
(worldPos.y / push_constants.screenSize.y) * 2.0 - 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue