Fix calculation error in the bloom fog gradient.

fixees #995
This commit is contained in:
IntegratedQuantum 2025-02-02 18:23:09 +01:00
parent 2a27f185e3
commit a0365dabd9

View File

@ -13,7 +13,7 @@ uniform vec2 tanXY;
void main() {
vec2 position = inTexCoords*2 - vec2(1, 1);
direction = (invViewMatrix * vec4(position.x/tanXY.x/2, 1, position.y/tanXY.y/2, 0)).xyz;
direction = (invViewMatrix * vec4(position.x*tanXY.x, 1, position.y*tanXY.y, 0)).xyz;
normalizedTexCoords = inTexCoords;
texCoords = inTexCoords*textureSize(color, 0) - 0.25;
gl_Position = vec4(position, 0, 1);