Skip to content

Commit cc4ecd3

Browse files
committed
UPBGE: Make lights textures scale possible
We just add a line to the shader to use vec3 scale factor. It makes the "size" X, Y and Z options of lights textures available to scale the textures.
1 parent b2d4b30 commit cc4ecd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/blender/gpu/shaders/gpu_shader_material.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,7 @@ void shade_light_texture(vec3 rco, sampler2D cookie, vec3 scale, float lodbias,
23862386

23872387
vec4 co = shadowpersmat * vec4(rco, 1.0);
23882388

2389-
result = texture2DProj(cookie, co, lodbias);
2389+
result = texture2DProj(cookie, co * vec4(scale, 1.0), lodbias);
23902390
}
23912391

23922392
void shade_exposure_correct(vec3 col, float linfac, float logfac, out vec3 outcol)

0 commit comments

Comments
 (0)