mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-09 03:59:53 -04:00
Fix shader compilation warning and work around weird shader miscompilation on my intel laptop.
This commit is contained in:
parent
546aad5090
commit
4a4af0964e
@ -154,7 +154,7 @@ void main() {
|
||||
totalOffset += ivec3(equal(textureY[oldNormal], ivec3(-1))) + (vertexID & 1)*textureY[oldNormal];
|
||||
totalOffset = ivec3(permutationMatrix*(vec3(equal(mirrorVector, vec3(1)))*totalOffset + vec3(equal(mirrorVector, vec3(-1)))*(1 - totalOffset)));
|
||||
ivec3 lowerBound = voxelModels[modelIndex].minimum.xyz;
|
||||
ivec3 size = voxelModels[modelIndex].maximum.xyz - lowerBound;
|
||||
ivec3 size = voxelModels[modelIndex].maximum.xyz - voxelModels[modelIndex].minimum.xyz;
|
||||
totalOffset = lowerBound + size*totalOffset;
|
||||
position += totalOffset - 16*ivec3(normals[normal]);
|
||||
|
||||
|
@ -95,7 +95,7 @@ float calculateFogDistance(float dist, float fogDensity) {
|
||||
|
||||
void applyFrontfaceFog(float fogDistance, vec3 fogColor) {
|
||||
float fogFactor = exp(fogDistance);
|
||||
fragColor.rgb = fragColor.rgb*fogFactor + fogColor*(1 - fogFactor);
|
||||
fragColor.rgb = fogColor*(1 - fogFactor);
|
||||
fragColor.a = fogFactor;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user