mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-10 12:58:21 -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 {
|
struct QuadInfo {
|
||||||
vec3 normal;
|
vec3 normal;
|
||||||
vec3 corners[4];
|
float corners[4][3];
|
||||||
vec2 cornerUV[4];
|
vec2 cornerUV[4];
|
||||||
uint textureSlot;
|
uint textureSlot;
|
||||||
int opaqueInLod;
|
int opaqueInLod;
|
||||||
@ -49,7 +49,7 @@ void main() {
|
|||||||
|
|
||||||
normal = quads[quadIndex].normal;
|
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 += vec3(chunkPos - playerPositionInteger);
|
||||||
position -= playerPositionFraction;
|
position -= playerPositionFraction;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ layout(location = 3) uniform uint light;
|
|||||||
|
|
||||||
struct QuadInfo {
|
struct QuadInfo {
|
||||||
vec3 normal;
|
vec3 normal;
|
||||||
vec3 corners[4];
|
float corners[4][3];
|
||||||
vec2 cornerUV[4];
|
vec2 cornerUV[4];
|
||||||
uint textureSlot;
|
uint textureSlot;
|
||||||
int opaqueInLod;
|
int opaqueInLod;
|
||||||
@ -43,7 +43,7 @@ void main() {
|
|||||||
|
|
||||||
normal = quads[faceID].normal;
|
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);
|
vec4 mvPos = viewMatrix*vec4(position, 1);
|
||||||
gl_Position = projectionMatrix*mvPos;
|
gl_Position = projectionMatrix*mvPos;
|
||||||
|
@ -24,7 +24,7 @@ layout(std430, binding = 2) buffer _modelInfo
|
|||||||
|
|
||||||
struct QuadInfo {
|
struct QuadInfo {
|
||||||
vec3 normal;
|
vec3 normal;
|
||||||
vec3 corners[4];
|
float corners[4][3];
|
||||||
vec2 cornerUV[4];
|
vec2 cornerUV[4];
|
||||||
uint textureSlot;
|
uint textureSlot;
|
||||||
int opaqueInLod;
|
int opaqueInLod;
|
||||||
@ -80,7 +80,7 @@ void main() {
|
|||||||
uint quadIndex = modelAndTexture >> 16u;
|
uint quadIndex = modelAndTexture >> 16u;
|
||||||
textureIndex = int(modelAndTexture & 65535u);
|
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];
|
uv = quads[quadIndex].cornerUV[vertexID];
|
||||||
if(offsetByNormal != 0) {
|
if(offsetByNormal != 0) {
|
||||||
pos += quads[quadIndex].normal;
|
pos += quads[quadIndex].normal;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user