Alot of work
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
layout(binding=0) uniform sampler2D colourTexture;
|
||||
in vec2 uv;
|
||||
void main() {
|
||||
gl_Colour = texture(colourTexture, uv);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
void main() {
|
||||
gl_Position =
|
||||
}
|
||||
@@ -66,5 +66,9 @@ layout(binding = 6, std430) readonly restrict buffer BiomeBuffer {
|
||||
};
|
||||
|
||||
layout(binding = 7, std430) readonly restrict buffer LightingBuffer {
|
||||
vec4 lightData[];
|
||||
uint lightData[];
|
||||
};
|
||||
|
||||
vec4 getLighting(uint index) {
|
||||
return vec4((uvec4(lightData[index])>>uvec4(16,8,0,24))&uvec4(0xFF))*vec4(1f/255.0f);
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@ void main() {
|
||||
uint biomeId = extractBiomeId(quad);
|
||||
State stateInfo = stateData[stateId];
|
||||
colour = uint2vec4RGBA(stateInfo.faceColours[face]);
|
||||
|
||||
colour *= getLighting(extractLightId(quad));
|
||||
|
||||
if (((stateInfo.biomeTintMsk>>face)&1) == 1) {
|
||||
vec4 biomeColour = uint2vec4RGBA(biomeData[biomeId].foliage);
|
||||
colour *= biomeColour;
|
||||
|
||||
Reference in New Issue
Block a user