mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
Fix remaining shaders affected by a8b36f3ca450d83e9fd2e903bb998b5f4169b7ad
This commit is contained in:
parent
a8b36f3ca4
commit
ba5711f607
@ -18,7 +18,7 @@ layout(location = 8) uniform ivec3 blockPos;
|
||||
|
||||
struct QuadInfo {
|
||||
vec3 normal;
|
||||
vec3 corners[4];
|
||||
float corners[4][3];
|
||||
vec2 cornerUV[4];
|
||||
uint textureSlot;
|
||||
int opaqueInLod;
|
||||
@ -49,7 +49,7 @@ void main() {
|
||||
|
||||
normal = quads[quadIndex].normal;
|
||||
|
||||
position += quads[quadIndex].corners[vertexID];
|
||||
position += vec3(quads[quadIndex].corners[vertexID][0], quads[quadIndex].corners[vertexID][1], quads[quadIndex].corners[vertexID][2]);
|
||||
position += vec3(chunkPos - playerPositionInteger);
|
||||
position -= playerPositionFraction;
|
||||
|
||||
|
@ -12,7 +12,7 @@ layout(location = 3) uniform uint light;
|
||||
|
||||
struct QuadInfo {
|
||||
vec3 normal;
|
||||
vec3 corners[4];
|
||||
float corners[4][3];
|
||||
vec2 cornerUV[4];
|
||||
uint textureSlot;
|
||||
int opaqueInLod;
|
||||
@ -43,7 +43,7 @@ void main() {
|
||||
|
||||
normal = quads[faceID].normal;
|
||||
|
||||
vec3 position = quads[faceID].corners[vertexID];
|
||||
vec3 position = vec3(quads[faceID].corners[vertexID][0], quads[faceID].corners[vertexID][1], quads[faceID].corners[vertexID][2]);
|
||||
|
||||
vec4 mvPos = viewMatrix*vec4(position, 1);
|
||||
gl_Position = projectionMatrix*mvPos;
|
||||
|
@ -24,7 +24,7 @@ layout(std430, binding = 2) buffer _modelInfo
|
||||
|
||||
struct QuadInfo {
|
||||
vec3 normal;
|
||||
vec3 corners[4];
|
||||
float corners[4][3];
|
||||
vec2 cornerUV[4];
|
||||
uint textureSlot;
|
||||
int opaqueInLod;
|
||||
@ -80,7 +80,7 @@ void main() {
|
||||
uint quadIndex = modelAndTexture >> 16u;
|
||||
textureIndex = int(modelAndTexture & 65535u);
|
||||
|
||||
pos = quads[quadIndex].corners[vertexID];
|
||||
pos = vec3(quads[quadIndex].corners[vertexID][0], quads[quadIndex].corners[vertexID][1], quads[quadIndex].corners[vertexID][2]);
|
||||
uv = quads[quadIndex].cornerUV[vertexID];
|
||||
if(offsetByNormal != 0) {
|
||||
pos += quads[quadIndex].normal;
|
||||
|
Loading…
x
Reference in New Issue
Block a user