light penetration argument

This commit is contained in:
DBotThePony 2022-09-16 12:31:11 +07:00
parent 6483dae892
commit bacda9dd97
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -198,6 +198,7 @@ class LightRenderer(val state: GLStateTracker) {
color: Color = Color.WHITE,
radius: Float = 10f,
innerRadius: Float = radius / 3f,
lightPenetration: Float = 4f,
stack: Matrix4fStack = state.matrixStack
) {
state.ensureSameThread()
@ -224,7 +225,7 @@ class LightRenderer(val state: GLStateTracker) {
state.programs.softLightGeometry.use()
state.programs.softLightGeometry.transform.set(stack.last)
state.programs.softLightGeometry.lightPositionAndSize.set(Vector3f(position, innerRadius))
state.programs.softLightGeometry.lightPenetration.set(1f)
state.programs.softLightGeometry.lightPenetration.set(lightPenetration)
state.blendFunc = BlendFunc.ONLY_BLEND_ALPHA